Mathematics: Functions

Macro constants for commonly occurring mathematical numbers and for sharing by function approximations implemented on the CPU and for SIMD. The GPGPU book has a section that describes how the function approximations are generated.
Template definitions for wrappers named Sqrt for the square root function. These call directly to sqrt for floating-point numbers but are implemented for BSNumber and BSRational as square root approximations by typecasting the exact numbers to double precision.
Minimax polynomial approximations for sin(x) for x in [-pi/2,pi/2] and for odd degrees 3 through 11. Range reduction for x outside [-pi/2,pi/2] is obtained using periodicity and trigonometric identities.
Minimax polynomial approximations for cos(x) for x in [-pi/2,pi/2] and for even degrees 2 through 10. Range reduction for x outside [-pi/2,pi/2] is obtained using periodicity and trigonometric identities.
Minimax polynomial approximations for tan(x) for x in [-pi/4,pi/4] and for odd degrees 3 through 13. Range reduction for x outside [-pi/4,pi/4] but inside (-pi/2,pi/2) is obtained using the identity tan(z + pi/4) = (1 + tan(z))/(1 - tan(z)).
Minimax approximations for asin(x) of the form f(x) = pi/2 - sqrt(1-x)*p(x) for x in [0,1] and for polynomials of degrees 1 through 8.
Minimax approximations for acos(x) of the form f(x) = sqrt(1-x)*p(x) for x in [0,1] and for polynomials of degrees 1 through 8.
Minimax polynomial approximations for atan(x) for x in [-1,1] and for odd degrees 3 through 13. Range reduction for x outside [-1,1] is obtained by atan(x) = pi/2 - atan(1/x) for x > 0 and atan(x) = -pi/2 - atan(1/x) for x < 0.
Minimax polynomial approximations for sqrt(x) for x in [1,2] and for degrees 1 through 8. Range reduction is used for x outside [1,2] to obtain approximations to sqrt(x) for x >= 0.
Minimax polynomial approximations for 1/sqrt(x) for x in [1,2] and for degrees 1 through 8. Range reduction is used for x outside [1,2] to obtain approximations to 1/sqrt(x) for x > 0.
Minimax polynomial approximations for exp2(x) = 2^x for x in [0,1] and for degrees 1 through 7. Range reduction is used for x outside [0,1] to obtain approximations to exp2(x) for any x >= 0. Multiplication of the polynomial coefficients by a constant produces approximations for exp(x) = e^x for x >= 0.
Minimax polynomial approximations for log2(x), the logarithm base 2 of x, for x in [1,2] and for degrees 1 through 8. Range reduction is used for x outside [1,2] to obtain approximations to log2(x) for any x > 0. Multiplication of the polynomial coefficients by a constant produces approximations for log(x), the logarithm base e of x, for x > 0.
Estimates of sin(t*angle)/sin(angle) to be used in SLERP computations. The comments in the ChebyshevRatio class are extensive.