<s>
Before	O
the	O
existence	O
of	O
pocket	O
calculators	O
,	O
trigonometric	B-Algorithm
tables	I-Algorithm
were	O
essential	O
for	O
navigation	O
,	O
science	O
and	O
engineering	O
.	O
</s>
<s>
Often	O
,	O
these	O
libraries	O
use	O
pre-calculated	O
tables	O
internally	O
,	O
and	O
compute	O
the	O
required	O
value	O
by	O
using	O
an	O
appropriate	O
interpolation	B-Algorithm
method	O
.	O
</s>
<s>
Interpolation	B-Algorithm
of	O
simple	O
look-up	O
tables	O
of	O
trigonometric	O
functions	O
is	O
still	O
used	O
in	O
computer	O
graphics	O
,	O
where	O
only	O
modest	O
accuracy	O
may	O
be	O
required	O
and	O
speed	O
is	O
often	O
paramount	O
.	O
</s>
<s>
Another	O
important	O
application	O
of	O
trigonometric	B-Algorithm
tables	I-Algorithm
and	O
generation	O
schemes	O
is	O
for	O
fast	O
Fourier	O
transform	O
(	O
FFT	O
)	O
algorithms	O
,	O
where	O
the	O
same	O
trigonometric	O
function	O
values	O
(	O
called	O
twiddle	O
factors	O
)	O
must	O
be	O
evaluated	O
many	O
times	O
in	O
a	O
given	O
transform	O
,	O
especially	O
in	O
the	O
common	O
case	O
where	O
many	O
transforms	O
of	O
the	O
same	O
size	O
are	O
computed	O
.	O
</s>
<s>
One	O
common	O
method	O
,	O
especially	O
on	O
higher-end	O
processors	O
with	O
floating-point	B-Algorithm
units	O
,	O
is	O
to	O
combine	O
a	O
polynomial	O
or	O
rational	O
approximation	B-Algorithm
(	O
such	O
as	O
Chebyshev	O
approximation	B-Algorithm
,	O
best	O
uniform	O
approximation	B-Algorithm
,	O
Padé	O
approximation	B-Algorithm
,	O
and	O
typically	O
for	O
higher	O
or	O
variable	O
precisions	O
,	O
Taylor	O
and	O
Laurent	O
series	O
)	O
with	O
range	O
reduction	O
and	O
a	O
table	O
lookup	O
they	O
first	O
look	O
up	O
the	O
closest	O
angle	O
in	O
a	O
small	O
table	O
,	O
and	O
then	O
use	O
the	O
polynomial	O
to	O
compute	O
the	O
correction	O
.	O
</s>
<s>
Maintaining	O
precision	O
while	O
performing	O
such	O
interpolation	B-Algorithm
is	O
nontrivial	O
,	O
but	O
methods	O
like	O
Gal	B-Algorithm
's	I-Algorithm
accurate	I-Algorithm
tables	I-Algorithm
,	O
Cody	O
and	O
Waite	O
range	O
reduction	O
,	O
and	O
Payne	O
and	O
Hanek	O
radian	O
reduction	O
algorithms	O
can	O
be	O
used	O
for	O
this	O
purpose	O
.	O
</s>
<s>
On	O
simpler	O
devices	O
that	O
lack	O
a	O
hardware	B-Architecture
multiplier	O
,	O
there	O
is	O
an	O
algorithm	O
called	O
CORDIC	B-Algorithm
(	O
as	O
well	O
as	O
related	O
techniques	O
)	O
that	O
is	O
more	O
efficient	O
,	O
since	O
it	O
uses	O
only	O
shifts	O
and	O
additions	O
.	O
</s>
<s>
All	O
of	O
these	O
methods	O
are	O
commonly	O
implemented	O
in	O
hardware	B-Architecture
for	O
performance	O
reasons	O
.	O
</s>
<s>
The	O
particular	O
polynomial	O
used	O
to	O
approximate	O
a	O
trigonometric	O
function	O
is	O
generated	O
ahead	O
of	O
time	O
using	O
some	O
approximation	B-Algorithm
of	O
a	O
minimax	B-Algorithm
approximation	I-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
For	O
very	B-Algorithm
high	I-Algorithm
precision	I-Algorithm
calculations	O
,	O
when	O
series-expansion	O
convergence	O
becomes	O
too	O
slow	O
,	O
trigonometric	O
functions	O
can	O
be	O
approximated	O
by	O
the	O
arithmetic-geometric	O
mean	O
,	O
which	O
itself	O
approximates	O
the	O
trigonometric	O
function	O
by	O
the	O
(	O
complex	O
)	O
elliptic	O
integral	O
(	O
Brent	O
,	O
1976	O
)	O
.	O
</s>
<s>
Historically	O
,	O
the	O
earliest	O
method	O
by	O
which	O
trigonometric	B-Algorithm
tables	I-Algorithm
were	O
computed	O
,	O
and	O
probably	O
the	O
most	O
common	O
until	O
the	O
advent	O
of	O
computers	O
,	O
was	O
to	O
repeatedly	O
apply	O
the	O
half-angle	O
and	O
angle-addition	O
trigonometric	O
identities	O
starting	O
from	O
a	O
known	O
value	O
(	O
such	O
as	O
sin	O
(π/	O
2	O
)	O
=	O
1	O
,	O
cos	O
(π/	O
2	O
)	O
=	O
0	O
)	O
.	O
</s>
<s>
Various	O
other	O
permutations	O
on	O
these	O
identities	O
are	O
possible	O
:	O
for	O
example	O
,	O
some	O
early	O
trigonometric	B-Algorithm
tables	I-Algorithm
used	O
not	O
sine	O
and	O
cosine	O
,	O
but	O
sine	O
and	O
versine	O
.	O
</s>
<s>
Unfortunately	O
,	O
this	O
is	O
not	O
a	O
useful	O
algorithm	O
for	O
generating	O
sine	B-Algorithm
tables	I-Algorithm
because	O
it	O
has	O
a	O
significant	O
error	O
,	O
proportional	O
to	O
1/N	O
.	O
</s>
<s>
A	O
simple	O
recurrence	O
formula	O
to	O
generate	O
trigonometric	B-Algorithm
tables	I-Algorithm
is	O
based	O
on	O
Euler	O
's	O
formula	O
and	O
the	O
relation	O
:	O
</s>
<s>
This	O
method	O
would	O
produce	O
an	O
exact	O
table	O
in	O
exact	O
arithmetic	O
,	O
but	O
has	O
errors	O
in	O
finite-precision	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
.	O
</s>
<s>
In	O
fact	O
,	O
the	O
errors	O
grow	O
as	O
O(εN )	O
(	O
in	O
both	O
the	O
worst	O
and	O
average	O
cases	O
)	O
,	O
where	O
ε	O
is	O
the	O
floating-point	B-Algorithm
precision	O
.	O
</s>
