42 template <
typename FloatType>
43 static FloatType
cosh (FloatType x)
noexcept
46 auto numerator = -(39251520 + x2 * (18471600 + x2 * (1075032 + 14615 * x2)));
47 auto denominator = -39251520 + x2 * (1154160 + x2 * (-16632 + 127 * x2));
48 return numerator / denominator;
57 template <
typename FloatType>
70 template <
typename FloatType>
71 static FloatType
sinh (FloatType x)
noexcept
74 auto numerator = -x * (11511339840 + x2 * (1640635920 + x2 * (52785432 + x2 * 479249)));
75 auto denominator = -11511339840 + x2 * (277920720 + x2 * (-3177720 + x2 * 18361));
76 return numerator / denominator;
85 template <
typename FloatType>
98 template <
typename FloatType>
99 static FloatType
tanh (FloatType x)
noexcept
102 auto numerator = x * (135135 + x2 * (17325 + x2 * (378 + x2)));
103 auto denominator = 135135 + x2 * (62370 + x2 * (3150 + 28 * x2));
104 return numerator / denominator;
113 template <
typename FloatType>
127 template <
typename FloatType>
128 static FloatType
cos (FloatType x)
noexcept
131 auto numerator = -(-39251520 + x2 * (18471600 + x2 * (-1075032 + 14615 * x2)));
132 auto denominator = 39251520 + x2 * (1154160 + x2 * (16632 + x2 * 127));
133 return numerator / denominator;
142 template <
typename FloatType>
155 template <
typename FloatType>
156 static FloatType
sin (FloatType x)
noexcept
159 auto numerator = -x * (-11511339840 + x2 * (1640635920 + x2 * (-52785432 + x2 * 479249)));
160 auto denominator = 11511339840 + x2 * (277920720 + x2 * (3177720 + x2 * 18361));
161 return numerator / denominator;
170 template <
typename FloatType>
183 template <
typename FloatType>
184 static FloatType
tan (FloatType x)
noexcept
187 auto numerator = x * (-135135 + x2 * (17325 + x2 * (-378 + x2)));
188 auto denominator = -135135 + x2 * (62370 + x2 * (-3150 + 28 * x2));
189 return numerator / denominator;
198 template <
typename FloatType>
212 template <
typename FloatType>
213 static FloatType
exp (FloatType x)
noexcept
215 auto numerator = 1680 + x * (840 + x * (180 + x * (20 + x)));
216 auto denominator = 1680 + x *(-840 + x * (180 + x * (-20 + x)));
217 return numerator / denominator;
226 template <
typename FloatType>
239 template <
typename FloatType>
242 auto numerator = x * (7560 + x * (15120 + x * (9870 + x * (2310 + x * 137))));
243 auto denominator = 7560 + x * (18900 + x * (16800 + x * (6300 + x * (900 + 30 * x))));
244 return numerator / denominator;
253 template <
typename FloatType>
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
This class contains various fast mathematical function approximations.
static void cos(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction,...
static FloatType tanh(FloatType x) noexcept
Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction,...
static void tanh(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function tanh(x) using a Pade approximant continued fraction,...
static FloatType sinh(FloatType x) noexcept
Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction,...
static FloatType sin(FloatType x) noexcept
Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction,...
static FloatType logNPlusOne(FloatType x) noexcept
Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction,...
static void sin(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function sin(x) using a Pade approximant continued fraction,...
static FloatType exp(FloatType x) noexcept
Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction,...
static void logNPlusOne(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function log(x+1) using a Pade approximant continued fraction,...
static FloatType cos(FloatType x) noexcept
Provides a fast approximation of the function cos(x) using a Pade approximant continued fraction,...
static FloatType tan(FloatType x) noexcept
Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction,...
static void cosh(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction,...
static void sinh(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function sinh(x) using a Pade approximant continued fraction,...
static void exp(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function exp(x) using a Pade approximant continued fraction,...
static FloatType cosh(FloatType x) noexcept
Provides a fast approximation of the function cosh(x) using a Pade approximant continued fraction,...
static void tan(FloatType *values, size_t numValues) noexcept
Provides a fast approximation of the function tan(x) using a Pade approximant continued fraction,...