/** * Advanced niche special functions: the Riemann–Siegel Z-function, the Lerch * transcendent, the parabolic-cylinder function D_ν, and the regular Coulomb * wave function F_L. * * These follow the same plain-exported-function pattern as `niche.ts` and * `hypergeometric.ts` — pure real-valued `number -> number` math with no * typed-function array/WASM dispatch overloads. Each is oracle-pinned against * `mpmath` (dps=30) in `functions/tests/gap-special-wave-oracle.test.ts`. * * The self-contained complex-arithmetic helpers here (complex log-gamma via * Lanczos, and a critical-line Borwein ζ evaluator) exist so these functions * stay pure `number`-in/`number`-out and do not need the factory `zeta` * (which requires a full math instance with a Complex constructor). * * @packageDocumentation */ /** 64-bit float (default for decimals) */ type f64 = number; /** * Riemann–Siegel Z-function Z(t) = e^{iθ(t)} ζ(1/2 + it), the real-valued * function on the critical line whose real zeros coincide with the imaginary * parts of the non-trivial zeros of ζ. Z is even: Z(−t) = Z(t), and * Z(0) = ζ(1/2) ≈ −1.4603545088. * * Computed by evaluating ζ(1/2 + it) via the Borwein-accelerated series and * the theta function via the complex log-gamma, then taking the (real) product * — i.e. Z(t) = cos θ · Re ζ − sin θ · Im ζ. This exact-theta approach is * accurate for all t (the classical Riemann–Siegel asymptotic expansion, by * contrast, is inaccurate for the small t of the first few zeros). * * Verified against `mpmath.siegelz` (dps=30): relative error < 1e-11 for * O(1)-magnitude values and absolute error < 1e-9 near the first zeros * (t ≈ 14.13, 21.02, 25.01), for |t| up to ~40. * * @param t - Height on the critical line (real; any sign) * @returns Z(t) * * @example * siegelZ(15) // ~0.7199423913 * siegelZ(14.134725) // ~-1.12e-7 (near the first zeta zero) */ export declare function siegelZ(t: f64): f64; /** * Alias for {@link siegelZ} — the Riemann–Siegel Z-function Z(t). */ export declare function riemannSiegelZ(t: f64): f64; /** * Lerch transcendent Φ(z, s, a) = Σ_{k≥0} z^k / (a + k)^s, evaluated by its * defining power series (DLMF 25.14.1), which converges for `|z| < 1` and any * real `s`, provided `a > 0` (so no denominator vanishes). * * Analytic continuation to `|z| ≥ 1` is out of scope and throws. The boundary * case Φ(1, s, a) = ζ(s, a) is the Hurwitz zeta, not implemented here. * * Cross-check: the polylogarithm satisfies `Li_s(z) = z · Φ(z, s, 1)`. * * Verified against `mpmath.lerchphi` (dps=30) to relative error < 1e-12 across * real `z ∈ (−1, 1)` and assorted `s`, `a`. * * @param z - Argument, must satisfy `|z| < 1` * @param s - Order (any real number) * @param a - Offset (real, `a > 0`) * @returns Φ(z, s, a) * @throws Error if `|z| >= 1`, or if `a + k <= 0` for some term (a <= 0) * * @example * lerchPhi(0.5, 2, 1) // ~1.1644810529 (= 2·Li_2(0.5)) */ export declare function lerchPhi(z: f64, s: f64, a: f64): f64; /** * Parabolic cylinder function D_ν(x) (Whittaker's form), via the confluent * hypergeometric representation (Abramowitz & Stegun 19.3.1 / DLMF 12.4.1): * * D_ν(x) = 2^{ν/2} e^{−x²/4} [ √π / Γ((1−ν)/2) · M(−ν/2; 1/2; x²/2) * − √(2π) x / Γ(−ν/2) · M((1−ν)/2; 3/2; x²/2) ] * * where M = ₁F₁ is Kummer's function (`hyp1f1`). The even/odd split makes this * valid for any real order ν and any real x (D_ν is entire in x); accuracy is * best for moderate |x| where the ₁F₁ series converges without heavy * cancellation. * * Verified against `mpmath.pcfd` (dps=30) to relative error < 1e-10 on a corpus * of real (ν, x) with |x| ≤ ~2. * * @param nu - Order (real) * @param x - Argument (real) * @returns D_ν(x) * * @example * parabolicCylinderD(0, 1) // ~0.7788007831 (= e^{-1/4}) */ export declare function parabolicCylinderD(nu: f64, x: f64): f64; /** * Regular Coulomb wave function F_L(η, ρ), via its ascending power series * (DLMF 33.6.1–33.6.2): * * F_L(η, ρ) = C_L(η) ρ^{L+1} Σ_{k≥0} A_k ρ^k, * A_0 = 1, A_1 = η/(L+1), A_k = (2η A_{k−1} − A_{k−2}) / (k (k + 2L + 1)). * * The series is entire in ρ, so this converges for all ρ ≥ 0 (accuracy is best * for small-to-moderate ρ before large-argument cancellation sets in). The * *irregular* companion G_L is provided by {@link coulombG} / {@link coulombFG} * via Steed's continued-fraction method. * * Verified against `mpmath.coulombf` (dps=30) to relative error < 1e-6 (in * practice < 1e-9 away from zeros) for L ∈ {0,1,2,3}, |η| ≤ 5, ρ ≤ 10. * * Special case: F_0(0, ρ) = sin ρ. * * @param L - Orbital angular momentum (real, `L >= 0`) * @param eta - Sommerfeld parameter (real) * @param rho - Radial variable (real, `rho >= 0`) * @returns F_L(η, ρ) * @throws Error if `rho < 0` or `L < 0` * * @example * coulombF(0, 0, 1) // ~0.8414709848 (= sin 1) */ export declare function coulombF(L: f64, eta: f64, rho: f64): f64; /** The four Coulomb radial functions at a point: F, F′, G, G′. */ export interface CoulombFG { /** Regular function F_L(η, ρ). */ F: f64; /** Derivative F′_L(η, ρ) = dF/dρ. */ Fp: f64; /** Irregular function G_L(η, ρ). */ G: f64; /** Derivative G′_L(η, ρ) = dG/dρ. */ Gp: f64; } /** * Irregular Coulomb wave function G_L(η, ρ), the second (non-oscillatory-at- * origin) solution of the Coulomb radial equation, computed by Steed's * continued-fraction method (Barnett 1982): CF1 for F′/F (DLMF 33.8.1), CF2 for * (G′+iF′)/(G+iF) (DLMF 33.8.2), then Steed recovery via the Wronskian * F′G − FG′ = 1 (DLMF 33.8.4–33.8.5). The sign of the regular solution is taken * from {@link coulombF}. * * Special case: G_0(0, ρ) = cos ρ. * * **Validated domain** (vs `mpmath.coulombg`, dps=30): for the turning point * ρ_tp = η + √(η² + L(L+1)), accuracy is ~1e-12 at and above ρ_tp and stays * below 1e-6 down to ρ ≈ 0.15·ρ_tp. CF2 degrades *far* below the turning point: * for large positive η with ρ ≪ ρ_tp (e.g. η = 5, ρ ≤ 1) the relative error * grows (up to ~1e-1 at L = 3, η = 5, ρ = 0.5). This is the well-known limit of * Steed's method deep in the classically-forbidden region; such points are * outside the validated domain. Verified to relative error < 1e-6 (in practice * ≤ 3e-10) for L ∈ {0,1,2,3}, |η| ≤ 5, ρ ∈ {0.5,…,20} excluding that corner. * * @param L - Orbital angular momentum (real, `L >= 0`) * @param eta - Sommerfeld parameter (real) * @param rho - Radial variable (real, `rho > 0`) * @returns G_L(η, ρ) * @throws Error if `rho <= 0` or `L < 0` * * @example * coulombG(0, 0, 1) // ~0.5403023059 (= cos 1) */ export declare function coulombG(L: f64, eta: f64, rho: f64): f64; /** * Both Coulomb wave functions and their derivatives at a point, returned * together: `{ F, Fp, G, Gp }` = {F_L, F′_L, G_L, G′_L}(η, ρ). Computed by * Steed's method in a single pass (see {@link coulombG}); the four values * satisfy the Wronskian F′G − FG′ = 1 to machine precision by construction. * The same validated domain as {@link coulombG} applies. * * @param L - Orbital angular momentum (real, `L >= 0`) * @param eta - Sommerfeld parameter (real) * @param rho - Radial variable (real, `rho > 0`) * @returns `{ F, Fp, G, Gp }` * @throws Error if `rho <= 0` or `L < 0` * * @example * coulombFG(0, 0, 1) // { F: sin 1, Fp: cos 1, G: cos 1, Gp: -sin 1 } */ export declare function coulombFG(L: f64, eta: f64, rho: f64): CoulombFG; export {}; //# sourceMappingURL=wave-functions.d.ts.map