(x: number)
| 2729 | |
| 2730 | if (x < -9) { |
| 2731 | const [P, Q, cosA, sinA, pref] = airyNegPartsPrime(-x); |
| 2732 | return pref * (cosA * P + sinA * Q); // DLMF 9.7.12 |
| 2733 | } |
| 2734 | |
| 2735 | const [fp, gp] = airySeriesFGPrime(x); |
| 2736 | return ddMul(SQRT3_DD, ddAdd(ddMul(AIRY_C1, fp), ddMul(AIRY_C2, gp)))[0]; |
| 2737 | } |
| 2738 | |
| 2739 | // ────────────────────────────────────────────────────────────────── |
| 2740 | // Fresnel integrals |
| 2741 | // |
| 2742 | // S(x) = ∫₀ˣ sin(π t²/2) dt |
| 2743 | // C(x) = ∫₀ˣ cos(π t²/2) dt |
| 2744 | // |
| 2745 | // Rational Chebyshev approximation from Cephes / scipy. |
| 2746 | // Three regions: |x|<1.6, 1.6≤|x|<36, |x|≥36. |
| 2747 | // ────────────────────────────────────────────────────────────────── |
| 2748 | |
| 2749 | // Region 1 (|x| < 1.6): S(x) = x³ P(x⁴)/Q(x⁴) |
| 2750 | // Coefficients from Cephes (π/2 factor is baked into the coefficients) |
no test coverage detected