/** * Typed Special Functions * * Special mathematical functions using typed-function for runtime dispatch. * Includes the error functions, beta/gamma functions, Bessel functions, * elliptic integrals, orthogonal polynomials and integral functions. * * Each single-argument function has a `Float64Array` overload that evaluates * the function across a whole array, parallelizing large inputs via the * worker pool. Multi-argument functions take a `Float64Array` for their * varying argument with the remaining parameters fixed. * * @packageDocumentation */ /** 64-bit float (default for decimals) */ type f64 = number; /** Complementary error function erfc(x) = 1 - erf(x). */ export declare function erfcScalar(x: f64): f64; /** * Complementary error function: erfc(x) = 1 - erf(x). * * @param x - Input value, or Float64Array of values * @returns 1 - erf(x) * * @example * erfc(0) // 1 * erfc(1) // ~0.1573 */ export declare const erfc: import("@danielsimonjr/mathts-core").TypedFunction; /** * Imaginary error function: erfi(x) = -i * erf(ix). * * @param x - Input value, or Float64Array of values * @returns erfi(x) */ export declare const erfi: import("@danielsimonjr/mathts-core").TypedFunction; export declare const lgamma: import("@danielsimonjr/mathts-core").TypedFunction; /** * Beta function: B(a, b) = Gamma(a) * Gamma(b) / Gamma(a + b). * * @param a - First parameter (positive), or Float64Array of values * @param b - Second parameter (positive) * @returns B(a, b) * * @example * beta(2, 3) // 1/12 ~ 0.08333 */ export declare const beta: import("@danielsimonjr/mathts-core").TypedFunction; /** * Regularized lower incomplete gamma function P(a, x) = gamma(a, x) / Gamma(a). * * @param a - Shape parameter (positive) * @param x - Integration upper limit, or Float64Array of limits * @returns P(a, x) * * @example * gammainc(1, 1) // 1 - 1/e ~ 0.6321 */ export declare const gammainc: import("@danielsimonjr/mathts-core").TypedFunction; /** * Upper (complementary) regularized incomplete gamma: Q(a, x) = 1 - P(a, x). * * @param a - Shape parameter (positive) * @param x - Lower limit, or Float64Array of limits * @returns Q(a, x) */ export declare const gammaincp: import("@danielsimonjr/mathts-core").TypedFunction; /** * Regularized incomplete beta function I_x(a, b). * * @param a - First parameter (positive) * @param b - Second parameter (positive) * @param x - Upper limit in [0, 1], or Float64Array of limits * @returns I_x(a, b) */ export declare const betainc: import("@danielsimonjr/mathts-core").TypedFunction; /** * Digamma function: psi(x) = d/dx ln(Gamma(x)). * * @param x - Input value, or Float64Array of values * @returns psi(x) * * @example * digamma(1) // -gamma ~ -0.5772 */ export declare const digamma: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the first kind, order 0: J0(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1); smaller inputs and * scalars use the inline JS approximation. * * @param x - Input value, or Float64Array of values * @returns J0(x) */ export declare const besselJ0: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the first kind, order 1: J1(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1). * * @param x - Input value, or Float64Array of values * @returns J1(x) */ export declare const besselJ1: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the second kind, order 0: Y0(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1, Y0). * * @param x - Input value (must be positive), or Float64Array of values * @returns Y0(x) */ export declare const besselY0: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the second kind, order 1: Y1(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1, Y1). * * @param x - Input value (must be positive), or Float64Array of values * @returns Y1(x) */ export declare const besselY1: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the first kind, general integer order n: J_n(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1, Jn). * * @param n - Order (integer) * @param x - Input value, or Float64Array of values * @returns J_n(x) */ export declare const besselJ: import("@danielsimonjr/mathts-core").TypedFunction; /** * Bessel function of the second kind, general integer order n: Y_n(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS, Slice 3.10c-1, Yn). * * @param n - Order (integer) * @param x - Input value (must be positive), or Float64Array of values * @returns Y_n(x) */ export declare const besselY: import("@danielsimonjr/mathts-core").TypedFunction; /** * Modified Bessel function of the first kind, I_n(x). * * @param n - Order (integer) * @param x - Input value, or Float64Array of values * @returns I_n(x) */ export declare const besselI: import("@danielsimonjr/mathts-core").TypedFunction; /** * Modified Bessel function of the second kind, K_n(x). * * @param n - Order (integer) * @param x - Input value (must be positive), or Float64Array of values * @returns K_n(x) */ export declare const besselK: import("@danielsimonjr/mathts-core").TypedFunction; /** * Complete elliptic integral of the first kind K(m). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS via elliptic_k_f64_as, Slice 5.3). * * Algorithm: AGM (arithmetic-geometric mean) — K = π / (2·agm(1, √(1−m))). * Converges quadratically; ~10 iterations for full f64 precision. * * Domain: m ∈ [0, 1). K(1) = +∞. m < 0 or m > 1 → NaN. * * Reference values (DLMF §19.6): * K(0) = π/2 ≈ 1.5707963267948966 * K(0.5) ≈ 1.8540746773013719 * K(0.99) ≈ 3.6956373629898747 * * @param m - Parameter (0 <= m < 1), or Float64Array of parameters * @returns K(m) */ export declare const ellipticK: import("@danielsimonjr/mathts-core").TypedFunction; /** * Elliptic integral of the second kind E(phi, m) or complete form E(m). * * With one number argument, returns the complete integral E(m). * With a Float64Array, dispatches the complete integral E(m) across the array. * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) use the WASM kernel * (AS via elliptic_e_f64_as, Slice 5.3). * * Algorithm: Carlson-Bulirsch AGM variant (complete form). * Domain: m ∈ [0, 1]. E(0) = π/2, E(1) = 1. m < 0 or m > 1 → NaN. * * Reference values (DLMF §19.6): * E(0) = π/2 ≈ 1.5707963267948966 * E(0.5) ≈ 1.3506438810476755 * E(1) = 1.0 * * @param phi - Amplitude (radians), or Float64Array of m-values for complete form * @param m - Parameter (0 <= m <= 1) * @returns E(phi, m), or E(m) for the single-argument / array form */ export declare const ellipticE: import("@danielsimonjr/mathts-core").TypedFunction; /** * Chebyshev polynomial of the first kind T_n(x). * * @param n - Degree * @param x - Input value, or Float64Array of values * @returns T_n(x) */ export declare const chebyshevT: import("@danielsimonjr/mathts-core").TypedFunction; /** * Hermite polynomial H_n(x) (physicist's convention). * * @param n - Degree * @param x - Input value, or Float64Array of values * @returns H_n(x) */ export declare const hermiteH: import("@danielsimonjr/mathts-core").TypedFunction; /** * Laguerre polynomial L_n(x). * * @param n - Degree * @param x - Input value, or Float64Array of values * @returns L_n(x) */ export declare const laguerreL: import("@danielsimonjr/mathts-core").TypedFunction; /** * Legendre polynomial P_n(x). * * @param n - Degree * @param x - Input value in [-1, 1], or Float64Array of values * @returns P_n(x) */ export declare const legendreP: import("@danielsimonjr/mathts-core").TypedFunction; /** * Lambert W function. * * @param x - Input value (>= -1/e), or Float64Array of values * @param branch - Branch selector: 0 (default, principal branch W_0) or -1 * (lower real branch W_-1, defined for x in [-1/e, 0); NaN outside that range) * @returns W_branch(x) * * @example * lambertW(1) // ~0.5671 (omega constant) * lambertW(-0.3, -1) // ~-1.7813 (lower branch) */ export declare const lambertW: import("@danielsimonjr/mathts-core").TypedFunction; /** * Cosine integral Ci(x). * * @param x - Input value (positive), or Float64Array of values * @returns Ci(x) */ export declare const cosIntegral: import("@danielsimonjr/mathts-core").TypedFunction; /** * Sine integral Si(x). * * @param x - Input value, or Float64Array of values * @returns Si(x) */ export declare const sinIntegral: import("@danielsimonjr/mathts-core").TypedFunction; /** * Logarithmic integral li(x) = Ei(ln(x)). * * @param x - Input value (> 0, != 1), or Float64Array of values * @returns li(x) */ export declare const logIntegral: import("@danielsimonjr/mathts-core").TypedFunction; /** * Exponential integral Ei(x). * * @param x - Input value (x != 0), or Float64Array of values * @returns Ei(x) */ export declare const expIntegralEi: import("@danielsimonjr/mathts-core").TypedFunction; /** * Fresnel cosine integral C(x) = integral_0^x cos(pi*t^2/2) dt. * * @param x - Input value, or Float64Array of values * @returns C(x) */ export declare const fresnelC: import("@danielsimonjr/mathts-core").TypedFunction; /** * Fresnel sine integral S(x) = integral_0^x sin(pi*t^2/2) dt. * * @param x - Input value, or Float64Array of values * @returns S(x) */ export declare const fresnelS: import("@danielsimonjr/mathts-core").TypedFunction; /** * Airy function of the first kind Ai(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS via airy_ai_f64_as, Slice 4.9). * * Algorithm: * - |x| ≤ 4.5: power series (DLMF §9.2.2) — ~1e-10 relative error * - x > 4.5: decaying asymptotic exp(−ζ)/... (DLMF §9.7.3) — ~1e-7 * - x < −4.5: oscillatory asymptotic sin/cos (DLMF §9.7.5) — ~1e-7 * * Reference values (DLMF §9.2): * Ai(0) ≈ 0.355028053887817 * Ai(1) ≈ 0.135292416312881 * Ai(−1) ≈ 0.535560883292352 * * @param x - Input value, or Float64Array of values * @returns Ai(x) */ export declare const airyAi: import("@danielsimonjr/mathts-core").TypedFunction; /** * Airy function of the second kind Bi(x). * * Arrays of length ≥ WASM_SPECIAL_THRESHOLD (1024) are dispatched to the * WASM kernel (AS via airy_bi_f64_as, Slice 4.9). * * Reference values (DLMF §9.2): * Bi(0) ≈ 0.614926627446001 * Bi(1) ≈ 1.207423594952871 * Bi(−1) ≈ 0.103997389496945 * * @param x - Input value, or Float64Array of values * @returns Bi(x) */ export declare const airyBi: import("@danielsimonjr/mathts-core").TypedFunction; /** * Carlson degenerate symmetric integral RC(x, y). * * RC(x, y) = ∫_0^∞ dt / ((t+x)^{1/2} (t+y)) * * Identities: RC(0, 1) = π/2; RC(1, 1) = 1. * * Reference: DLMF §19.16.6; Numerical Recipes §6.11. * * @param x - First argument (≥ 0), or Float64Array of values * @param y - Second argument (≠ 0), or Float64Array of values */ export declare const carlsonRC: import("@danielsimonjr/mathts-core").TypedFunction; /** * Carlson symmetric integral RF(x, y, z). * * RF(x, y, z) = (1/2) ∫_0^∞ dt / (√(t+x)·√(t+y)·√(t+z)) * * Symmetry: RF is symmetric in all three arguments. * Identity: RF(0, 1, 2) ≈ 1.3110287771461... * * Reference: DLMF §19.16.1; Numerical Recipes §6.11. */ export declare const carlsonRF: import("@danielsimonjr/mathts-core").TypedFunction; /** * Carlson symmetric integral RD(x, y, z). * * RD(x, y, z) = (3/2) ∫_0^∞ dt / (√(t+x)·√(t+y)·(t+z)^{3/2}) * * Identity: RD(0, 2, 1) ≈ 1.7972103521033... * * Reference: DLMF §19.16.5; Numerical Recipes §6.11. */ export declare const carlsonRD: import("@danielsimonjr/mathts-core").TypedFunction; /** * Carlson symmetric integral RJ(x, y, z, p). * * RJ(x, y, z, p) = (3/2) ∫_0^∞ dt / ((t+p)·√(t+x)·√(t+y)·√(t+z)) * * Reference: DLMF §19.16.2; Numerical Recipes §6.11. */ export declare const carlsonRJ: import("@danielsimonjr/mathts-core").TypedFunction; /** * Incomplete elliptic integral of the first kind F(φ, m). * * F(φ, m) = ∫_0^φ dθ / √(1 − m·sin²θ) * * Implemented via F(φ, m) = sin(φ)·RF(cos²φ, 1−m·sin²φ, 1) (DLMF §19.25.5). * * Special cases: F(0, m) = 0; F(π/2, m) = K(m). * * Reference values (DLMF §19.6): F(π/2, 0.5) = K(0.5) ≈ 1.8540746773013719. * * @param phi - Amplitude in [0, π/2] * @param m - Parameter in [0, 1) */ export declare const ellipticF: import("@danielsimonjr/mathts-core").TypedFunction; /** * Incomplete elliptic integral of the second kind E(φ, m) — Carlson form. * * E(φ, m) = ∫_0^φ √(1 − m·sin²θ) dθ * * Implemented via Carlson forms (DLMF §19.25.7): * E(φ, m) = sin(φ)·RF(c², 1−m·s², 1) − (m/3)·s³·RD(c², 1−m·s², 1) * * Special cases: E(0, m) = 0; E(π/2, m) = E(m) (complete second kind). * * Named `ellipticEIncomplete` to distinguish from the existing `ellipticE` * export which handles both the complete form (1-arg) and the Simpson * 2-arg form. */ export declare const ellipticEIncomplete: import("@danielsimonjr/mathts-core").TypedFunction; /** * Incomplete elliptic integral of the third kind Π(n, φ, m). * * Π(n, φ, m) = ∫_0^φ dθ / ((1 − n·sin²θ)·√(1 − m·sin²θ)) * * Implemented via Carlson forms (DLMF §19.25.9): * Π(n, φ, m) = sin(φ)·RF(c², 1−m·s², 1) + (n/3)·s³·RJ(c², 1−m·s², 1, 1−n·s²) * * Special cases: Π(n, 0, m) = 0; Π(n, π/2, m) = Π(n, m) (complete third kind). * * Reference: DLMF §19.6, Abramowitz & Stegun §17.7. */ export declare const ellipticPi: import("@danielsimonjr/mathts-core").TypedFunction; /** * All typed special functions. */ export declare const typedSpecial: { erfc: import("@danielsimonjr/mathts-core").TypedFunction; lgamma: import("@danielsimonjr/mathts-core").TypedFunction; beta: import("@danielsimonjr/mathts-core").TypedFunction; gammainc: import("@danielsimonjr/mathts-core").TypedFunction; digamma: import("@danielsimonjr/mathts-core").TypedFunction; besselJ0: import("@danielsimonjr/mathts-core").TypedFunction; besselJ1: import("@danielsimonjr/mathts-core").TypedFunction; besselY0: import("@danielsimonjr/mathts-core").TypedFunction; besselY1: import("@danielsimonjr/mathts-core").TypedFunction; besselJ: import("@danielsimonjr/mathts-core").TypedFunction; besselY: import("@danielsimonjr/mathts-core").TypedFunction; besselI: import("@danielsimonjr/mathts-core").TypedFunction; besselK: import("@danielsimonjr/mathts-core").TypedFunction; betainc: import("@danielsimonjr/mathts-core").TypedFunction; gammaincp: import("@danielsimonjr/mathts-core").TypedFunction; ellipticK: import("@danielsimonjr/mathts-core").TypedFunction; ellipticE: import("@danielsimonjr/mathts-core").TypedFunction; chebyshevT: import("@danielsimonjr/mathts-core").TypedFunction; hermiteH: import("@danielsimonjr/mathts-core").TypedFunction; laguerreL: import("@danielsimonjr/mathts-core").TypedFunction; legendreP: import("@danielsimonjr/mathts-core").TypedFunction; lambertW: import("@danielsimonjr/mathts-core").TypedFunction; erfi: import("@danielsimonjr/mathts-core").TypedFunction; cosIntegral: import("@danielsimonjr/mathts-core").TypedFunction; sinIntegral: import("@danielsimonjr/mathts-core").TypedFunction; logIntegral: import("@danielsimonjr/mathts-core").TypedFunction; expIntegralEi: import("@danielsimonjr/mathts-core").TypedFunction; fresnelC: import("@danielsimonjr/mathts-core").TypedFunction; fresnelS: import("@danielsimonjr/mathts-core").TypedFunction; airyAi: import("@danielsimonjr/mathts-core").TypedFunction; airyBi: import("@danielsimonjr/mathts-core").TypedFunction; carlsonRC: import("@danielsimonjr/mathts-core").TypedFunction; carlsonRF: import("@danielsimonjr/mathts-core").TypedFunction; carlsonRD: import("@danielsimonjr/mathts-core").TypedFunction; carlsonRJ: import("@danielsimonjr/mathts-core").TypedFunction; ellipticF: import("@danielsimonjr/mathts-core").TypedFunction; ellipticEIncomplete: import("@danielsimonjr/mathts-core").TypedFunction; ellipticPi: import("@danielsimonjr/mathts-core").TypedFunction; }; export {}; //# sourceMappingURL=special.d.ts.map