| 168 | // Max error ~1e-5 for float, ~1e-10 for double on the reduced range. |
| 169 | template <typename F> |
| 170 | inline F sin_poly_quarterturn_(F x) FL_NOEXCEPT { |
| 171 | // sin(x) ≈ x - x³/6 + x⁵/120 - x⁷/5040 |
| 172 | const F x2 = x * x; |
| 173 | return x * (F(1) - x2 * (F(1.0 / 6.0) - x2 * (F(1.0 / 120.0) - x2 * F(1.0 / 5040.0)))); |
| 174 | } |
| 175 | |
| 176 | template <typename F> |
| 177 | inline F cos_poly_quarterturn_(F x) FL_NOEXCEPT { |