Gal's accurate tables is a method devised by Shmuel Gal to provide accurate values of special functions using a lookup table and interpolation. It is a fast and efficient method for generating values of functions like the exponential or the trigonometric functions to within last-bit
accuracy for almost all argument values without using extended precision arithmetic.
The main idea in Gal's accurate tables is a different tabulation for the special function being computed. Commonly, the range is divided into several subranges, each with precomputed values and correction formulae. To compute the function, look up the closest point and compute a correction as a function of the distance.
Gal's idea is to not precompute equally spaced values, but rather to perturb the points x so that both x and f(x) are very nearly exactly representable in the chosen numeric format. By searching approximately 1000 values on either side of the desired value x, a value can be found such that f(x) can be r