<s>
Gal	B-Algorithm
's	I-Algorithm
accurate	I-Algorithm
tables	I-Algorithm
is	O
a	O
method	O
devised	O
by	O
Shmuel	O
Gal	O
to	O
provide	O
accurate	O
values	O
of	O
special	O
functions	O
using	O
a	O
lookup	B-Data_Structure
table	I-Data_Structure
and	O
interpolation	B-Algorithm
.	O
</s>
<s>
The	O
main	O
idea	O
in	O
Gal	B-Algorithm
's	I-Algorithm
accurate	I-Algorithm
tables	I-Algorithm
is	O
a	O
different	O
tabulation	O
for	O
the	O
special	O
function	O
being	O
computed	O
.	O
</s>
<s>
Gal	O
's	O
idea	O
is	O
to	O
not	O
precompute	O
equally	O
spaced	O
values	O
,	O
but	O
rather	O
to	O
perturb	O
the	O
points	O
x	O
so	O
that	O
both	O
x	O
and	O
f(x )	O
are	O
very	O
nearly	O
exactly	O
representable	O
in	O
the	O
chosen	O
numeric	B-Algorithm
format	O
.	O
</s>
<s>
By	O
searching	O
approximately	O
1000	O
values	O
on	O
either	O
side	O
of	O
the	O
desired	O
value	O
x	O
,	O
a	O
value	O
can	O
be	O
found	O
such	O
that	O
f(x )	O
can	O
be	O
represented	O
with	O
less	O
than	O
±	O
1/2000	O
bit	O
of	O
rounding	B-Algorithm
error	I-Algorithm
.	O
</s>
<s>
If	O
the	O
correction	O
is	O
also	O
computed	O
to	O
±	O
1/2000	O
bit	O
of	O
accuracy	O
(	O
which	O
does	O
not	O
require	O
extra	O
floating-point	B-Algorithm
precision	O
as	O
long	O
as	O
the	O
correction	O
is	O
less	O
than	O
1/2000	O
the	O
magnitude	O
of	O
the	O
stored	O
value	O
f(x )	O
,	O
and	O
the	O
computed	O
correction	O
is	O
more	O
than	O
±	O
1/1000	O
of	O
a	O
bit	O
away	O
from	O
exactly	O
half	O
a	O
bit	O
(	O
the	O
difficult	O
rounding	B-Algorithm
case	O
)	O
,	O
then	O
it	O
is	O
known	O
whether	O
the	O
exact	O
function	O
value	O
should	O
be	O
rounded	O
up	O
or	O
down	O
.	O
</s>
<s>
In	O
2/1000	O
(	O
0.2	O
%	O
)	O
of	O
the	O
time	O
,	O
such	O
a	O
higher-precision	O
evaluation	O
is	O
required	O
to	O
resolve	O
the	O
rounding	B-Algorithm
uncertainty	O
,	O
but	O
this	O
is	O
infrequent	O
enough	O
that	O
it	O
has	O
little	O
effect	O
on	O
the	O
average	O
calculation	O
time	O
.	O
</s>
