/** * Niche special functions: polylogarithm, Struve H/L, Kelvin ber/bei (order * 0), and the Barnes G-function. * * These are lower-traffic special functions with narrower validity domains * than the Bessel/Airy/elliptic families in `typed/special.ts`. They follow * the same plain-exported-function pattern as `hypergeometric.ts` and * `polygamma-orthopoly.ts` — pure `number -> number` (or `number, number -> * number`) math, no typed-function array/WASM dispatch overloads. * * @packageDocumentation */ /** 64-bit float (default for decimals) */ type f64 = number; /** * Polylogarithm Li_s(z), computed via its defining series (DLMF 25.12.10): * * Li_s(z) = sum_{k=1}^inf z^k / k^s * * which converges for `|z| < 1` (any real `s`). Analytic continuation to * `|z| >= 1` (needed for e.g. the dilogarithm's reflection formulas) is * **out of scope** — this throws rather than silently returning a wrong or * divergent value. * * Special value: `Li_1(z) = -ln(1 - z)`. * * @param s - Order (any real number) * @param z - Argument, must satisfy `|z| < 1` * @returns Li_s(z) * @throws Error if `|z| >= 1` * * @example * polylog(2, 0.5) // ~0.5822405265 (dilogarithm) * polylog(1, 0.5) // ~0.6931471806 (= -ln(0.5) = ln 2) */ export declare function polylog(s: f64, z: f64): f64; /** * Struve function H_v(z), via its power series (DLMF 11.2.1): * * H_v(z) = sum_{k=0}^inf (-1)^k / (Gamma(k+3/2) Gamma(k+v+3/2)) * (z/2)^(2k+v+1) * * Evaluated by the standard term-recurrence ratio * `term_{k+1}/term_k = -(z/2)^2 / ((k+3/2)(k+v+3/2))`, seeded by a single * pair of `lgamma` evaluations (avoids recomputing Gamma at every order and * avoids overflow from large individual Gamma values). * * Valid for `z >= 0` and `v > -3/2` (so that `Gamma(v+3/2)` has no pole). * * @param v - Order (real, `v > -3/2`) * @param z - Argument (real, `z >= 0`) * @returns H_v(z) * * @example * struveH(0, 1) // ~0.5686566270 * struveH(1, 2) // ~0.6467637283 */ export declare function struveH(v: f64, z: f64): f64; /** * Modified Struve function L_v(z), via its power series (DLMF 11.2.1): * * L_v(z) = sum_{k=0}^inf 1 / (Gamma(k+3/2) Gamma(k+v+3/2)) * (z/2)^(2k+v+1) * * Same as `struveH` but without the alternating `(-1)^k` sign, so every term * is positive and the series grows monotonically for `z > 0` (like a * modified Bessel function). * * Valid for `z >= 0` and `v > -3/2`. * * @param v - Order (real, `v > -3/2`) * @param z - Argument (real, `z >= 0`) * @returns L_v(z) * * @example * struveL(0, 1) // ~0.7102431859 */ export declare function struveL(v: f64, z: f64): f64; /** * Kelvin function ber(x) (order 0), via its power series (DLMF 10.65.1): * * ber(x) = sum_{k=0}^inf (-1)^k (x/2)^(4k) / ((2k)!)^2 * * Evaluated by the term-recurrence ratio * `term_{k+1}/term_k = -(x/2)^4 / ((2k+1)(2k+2))^2`. * * @param x - Argument (real) * @returns ber(x) * * @example * kelvinBer(0) // 1 * kelvinBer(2) // ~0.7517341827 */ export declare function kelvinBer(x: f64): f64; /** * Kelvin function bei(x) (order 0), via its power series (DLMF 10.65.1): * * bei(x) = sum_{k=0}^inf (-1)^k (x/2)^(4k+2) / ((2k+1)!)^2 * * Evaluated by the term-recurrence ratio * `term_{k+1}/term_k = -(x/2)^4 / ((2k+2)(2k+3))^2`. * * @param x - Argument (real) * @returns bei(x) * * @example * kelvinBei(0) // 0 * kelvinBei(2) // ~0.9722916273 */ export declare function kelvinBei(x: f64): f64; /** * Barnes G-function G(z), for real `z > 0`. * * Uses the functional equation `G(z+1) = Gamma(z) * G(z)` to shift `z` up * until it is large enough for the asymptotic expansion of `ln G` (DLMF * 5.17.5) to converge to machine precision, then unwinds the shift: * * ln G(z) = ln G(z + n) - sum_{k=0}^{n-1} lgamma(z + k) * * Verified against `mpmath.barnesg` (dps=25) to relative error ~1e-14 across * the anchored integer/half-integer test values. Not extended to `z <= 0` * (Barnes G has zeros/sign changes on the non-positive real axis that this * shift-and-asymptotic approach does not handle) — that domain is out of * scope. * * Known integer values: `G(1) = G(2) = 1`, and in general * `G(n+3) = prod_{k=1}^{n} k!` for nonnegative integers `n` * (e.g. `G(4) = 2`, `G(5) = 12`, `G(6) = 288`). * * @param z - Argument (real, `z > 0`) * @returns G(z) * @throws Error if `z <= 0` * * @example * barnesG(4) // 2 (= 1!) * barnesG(5) // 12 (= 1! * 2!) * barnesG(4.5) // ~4.1862532590 */ export declare function barnesG(z: f64): f64; export {}; //# sourceMappingURL=niche.d.ts.map