CORDIC (coordinate rotation digital computer) is an iterative algorithm that approximates a planar rotation using addition, subtraction, and shifts of binary digits. Volder (1959) used it to compute trigonometric functions and their inverses.
In circular rotation mode, start with a vector and a target angle
with
. At step
, take
if
and
otherwise. Compute
|
(1)
| |||
|
(2)
| |||
|
(3)
|
The first two updates rotate the vector by and multiply its length by
. The third update tracks the angle still
to be applied. The arctangent values can be tabulated
in advance, and multiplication by
is a binary shift in fixed-point arithmetic.
After
steps, divide the coordinates by the common scale
|
(4)
|
In exact arithmetic the resulting vector is rotated by , with
as
. For example, starting
with
gives approximations to
and
without a final rescaling. In vectoring mode with
, choose
when
and
otherwise. With
, the iteration drives
toward zero, while
approaches
and
approaches
.
Walther (1971) unified the circular algorithm with linear and hyperbolic variants for evaluating other elementary functions, including logarithms and exponentials.