Special Functions (99)

The Float64Array signatures are synchronous. To use worker threads, call computePool.applyKernel(x, workerKernel(name, ...params)). The worker result is equal to the synchronous result bit for bit. See the migration guide.

airyAi
Airy functions of the first / second kind (JS; no WASM policy entry)
Syntax
airyAi(x)
airyBi
Airy functions of the first / second kind (JS; no WASM policy entry)
Syntax
airyBi(x)
barnesG
Barnes G-function (real z > 0)
Syntax
barnesG(z)
bernoulliPolynomial
Bernoulli polynomial B_n(x) (convention B₁ = −½) and Euler polynomial E_n(x)
Syntax
bernoulliPolynomial(n, x)
besselI
Modified Bessel functions
Syntax
besselI(n, x)
besselJ
Bessel first kind; n may be a real (non-integer) order (Temme series for x < 2, Steed continued fraction beyond, ~1e-15; JS Float64Array, no WASM policy entry)
Syntax
besselJ(n, x)
besselJ0
Bessel first kind; n may be a real (non-integer) order (Temme series for x < 2, Steed continued fraction beyond, ~1e-15; JS Float64Array, no WASM policy entry)
Syntax
besselJ0(x)
besselJ1
Bessel first kind; n may be a real (non-integer) order (Temme series for x < 2, Steed continued fraction beyond, ~1e-15; JS Float64Array, no WASM policy entry)
Syntax
besselJ1(x)
besselJZeros
First k positive zeros of J_ν(x), ascending (McMahon guess refined by Newton); besselJZeros(0, 2) is [2.4048…, 5.5201…]
Syntax
besselJZeros(nu, k)
besselK
Modified Bessel functions
Syntax
besselK(n, x)
besselY
Bessel second kind (x > 0); real (non-integer) order n via the same Temme/Steed scheme
Syntax
besselY(n, x)
besselY0
Bessel second kind (x > 0); real (non-integer) order n via the same Temme/Steed scheme
Syntax
besselY0(x)
besselY1
Bessel second kind (x > 0); real (non-integer) order n via the same Temme/Steed scheme
Syntax
besselY1(x)
beta
Beta function Γ(a)·Γ(b)/Γ(a+b)
Syntax
beta(a, b)
betainc
Incomplete beta function
Syntax
betainc(a, b, x)
carlsonRC
Carlson degenerate symmetric elliptic integral R_C(x, y)
Syntax
carlsonRC(x, y)
carlsonRD
Carlson symmetric elliptic integral of the second kind R_D
Syntax
carlsonRD(x, y, z)
carlsonRF
Carlson symmetric elliptic integral of the first kind R_F
Syntax
carlsonRF(x, y, z)
carlsonRJ
Carlson symmetric elliptic integral of the third kind R_J
Syntax
carlsonRJ(x, y, z, p)
chebyshevT
Chebyshev polynomial (first kind)
Syntax
chebyshevT(n, x)
clebschGordan
Clebsch–Gordan coefficient ⟨j1 m1; j2 m2 | J M⟩ = (−1)^{j1−j2+M}·√(2J+1)·wigner3j(j1, j2, J, m1, m2, −M)
Syntax
clebschGordan(j1, m1, j2, m2, J, M)
coshIntegral
Hyperbolic sine / cosine integrals Shi(x) (odd) and Chi(x) = γ + ln x + ∫₀ˣ(cosh t − 1)/t dt (Chi(0) = −Infinity, x < 0 gives NaN)
Syntax
coshIntegral(x)
cosIntegral
Sine / cosine integrals
Syntax
cosIntegral(x)
coulombF
Regular Coulomb wave function F_L(η, ρ) (ascending power series)
Syntax
coulombF(L, eta, rho)
coulombFG
{F, Fp, G, Gp} bundle — both Coulomb functions + derivatives (Wronskian F′G−FG′=1)
Syntax
coulombFG(L, eta, rho)
coulombG
Irregular Coulomb wave function G_L(η, ρ) (Steed continued fractions)
Syntax
coulombG(L, eta, rho)
dawson
Dawson integral F(x) = e^{−x²}∫₀ˣ e^{t²}dt (odd; positive series for |x| ≤ 25, asymptotic beyond)
Syntax
dawson(x)
digamma
Digamma d/dx ln Γ(x)
Syntax
digamma(x)
dirichletEta
Dirichlet eta η(s) = (1 − 2^{1−s})·ζ(s) for all real s (Borwein alternating series); η(1) = ln 2
Syntax
dirichletEta(s)
ellipticE
Complete elliptic integrals (JS; WASM dispatch refused; workers unreachable)
Syntax
ellipticE(m)
ellipticEIncomplete
Incomplete elliptic integral of the second kind E(φ, m)
Syntax
ellipticEIncomplete(phi, m)
ellipticF
Incomplete elliptic integral of the first kind F(φ, m) (parameter m = k²)
Syntax
ellipticF(phi, m)
ellipticK
Complete elliptic integrals (JS; WASM dispatch refused; workers unreachable)
Syntax
ellipticK(m)
ellipticPi
Incomplete elliptic integral of the third kind Π(n, φ, m)
Syntax
ellipticPi(n, phi, m)
erf
Error function (factory layer)
Syntax
erf(x)
erfc
Complementary error function 1 - erf(x)
Syntax
erfc(x)
erfcinv
Inverse error function (y ∈ [−1, 1]) / inverse complementary error function (y ∈ [0, 2]); erfinv(±1) = ±Infinity, out of range gives NaN; the complementary branch is used for |y| > ½ to avoid cancellation
Syntax
erfcinv(y)
erfcScalar
Scalar complementary error function 1 − erf(x)
Syntax
erfcScalar(x)
erfcx
Scaled complementary error function e^{x²}·erfc(x); stays finite for large positive x (asymptotic series) where erfc underflows and e^{x²} overflows
Syntax
erfcx(x)
erfi
Imaginary error function
Syntax
erfi(x)
erfinv
Inverse error function (y ∈ [−1, 1]) / inverse complementary error function (y ∈ [0, 2]); erfinv(±1) = ±Infinity, out of range gives NaN; the complementary branch is used for |y| > ½ to avoid cancellation
Syntax
erfinv(y)
eulerPolynomial
Bernoulli polynomial B_n(x) (convention B₁ = −½) and Euler polynomial E_n(x)
Syntax
eulerPolynomial(n, x)
expIntegralE1
E₁(x) = −Ei(−x) for real x > 0; x = 0 gives Infinity, x < 0 gives NaN
Syntax
expIntegralE1(x)
expIntegralEi
Exponential integral Ei(x)
Syntax
expIntegralEi(x)
expn
Generalized exponential integral E_n(x) = ∫₁^∞ e^{−xt}t^{−n}dt (n = 0 is e^{−x}/x; series plus upward recurrence for x ≤ 1, continued fraction for x > 1)
Syntax
expn(n, x)
ferrersP
Ferrers associated Legendre function P_n^m(x) on [−1, 1], including the Condon–Shortley (−1)^m factor
Syntax
ferrersP(n, m, x)
fresnelC
Fresnel integrals
Syntax
fresnelC(x)
fresnelS
Fresnel integrals
Syntax
fresnelS(x)
gamma
Gamma function (factory layer)
Syntax
gamma(x)
gammainc
Regularized lower incomplete gamma P(a, x)
Syntax
gammainc(a, x)
gammaincp
Regularized upper incomplete gamma Q(a, x)
Syntax
gammaincp(a, x)
gegenbauerC
Gegenbauer (ultraspherical) polynomial C_n^(alpha)(x)
Syntax
gegenbauerC(n, alpha, x)
hankelH1
Hankel functions of real order, H¹_ν = J_ν + iY_ν and H²_ν = J_ν − iY_ν (x > 0); return a Complex
Syntax
hankelH1(nu, x)
hankelH2
Hankel functions of real order, H¹_ν = J_ν + iY_ν and H²_ν = J_ν − iY_ν (x > 0); return a Complex
Syntax
hankelH2(nu, x)
hermiteH
Hermite polynomial
Syntax
hermiteH(n, x)
hurwitzZeta
Hurwitz zeta ζ(s, a) = Σ_{k≥0}(k + a)^{−s} for s > 1, a > 0 (Euler–Maclaurin: 10 leading terms + 8 Bernoulli corrections); NaN outside the domain
Syntax
hurwitzZeta(s, a)
hyp0f1
Confluent hypergeometric limit function 0F1(; b; z)
Syntax
hyp0f1(b, z)
hyp1f1
Kummer's confluent hypergeometric function 1F1(a; b; z) (Kummer's M)
Syntax
hyp1f1(a, b, z)
hyp2f1
Gauss's hypergeometric function 2F1(a, b; c; z) (requires |z| < 1)
Syntax
hyp2f1(a, b, c, z)
jacobiCN
Jacobi elliptic function cn(u, m) (parameter m = k²)
Syntax
jacobiCN(u, m)
jacobiDN
Jacobi elliptic function dn(u, m) (parameter m = k²)
Syntax
jacobiDN(u, m)
jacobiP
Jacobi polynomial P_n^(alpha,beta)(x)
Syntax
jacobiP(n, alpha, beta, x)
jacobiSN
Jacobi elliptic function sn(u, m) (parameter m = k²)
Syntax
jacobiSN(u, m)
kelvinBei
Kelvin functions ber(x), bei(x) (order 0)
Syntax
kelvinBei(x)
kelvinBer
Kelvin functions ber(x), bei(x) (order 0)
Syntax
kelvinBer(x)
laguerreL
Laguerre polynomial
Syntax
laguerreL(n, x)
lambertW
Lambert W function
Syntax
lambertW(x[, branch])
legendreP
Legendre polynomial
Syntax
legendreP(n, x)
lerchPhi
Lerch transcendent Φ(z, s, a) = Σ z^k/(a+k)^s (series, requires |z| < 1, a > 0)
Syntax
lerchPhi(z, s, a)
lgamma
Log-gamma (typed + factory); WASM only after loadWasm() at n ≥ 1 048 576
Syntax
lgamma(x)
AccelWASM (≥1 M)
loadWasm
parallel — ComputePool may dispatch to worker threads when the typed path passes an op name and length meets that op's DEFAULT_THRESHOLD_BY_OP entry (for example matmul at 4,096 via poolOptions(..., 'matmul')). When the path calls shouldParallelize(n) without an op name, only the…
Syntax
loadWasm(…)
logIntegral
Logarithmic integral li(x)
Syntax
logIntegral(x)
mathieuA
Mathieu characteristic values a_n(q) (even ce_n) / b_n(q) (odd se_n, n ≥ 1)
Syntax
mathieuA(n, q)
mathieuB
Mathieu characteristic values a_n(q) (even ce_n) / b_n(q) (odd se_n, n ≥ 1)
Syntax
mathieuB(n, q)
mathieuCe
Angular Mathieu functions ce_n(x, q) / se_n(x, q) (x in radians; se_n, n ≥ 1)
Syntax
mathieuCe(n, q, x)
mathieuSe
Angular Mathieu functions ce_n(x, q) / se_n(x, q) (x in radians; se_n, n ≥ 1)
Syntax
mathieuSe(n, q, x)
parabolicCylinderD
Parabolic-cylinder function D_ν(x) (Whittaker form via ₁F₁)
Syntax
parabolicCylinderD(nu, x)
pFq
Generic generalized hypergeometric function pFq(a; b; z)
Syntax
pFq(a[], b[], z)
polygamma
Polygamma function ψ^(n)(x), the n-th derivative of digamma
Syntax
polygamma(n, x)
polylog
Polylogarithm Li_s(z) (series, requires |z| < 1)
Syntax
polylog(s, z)
riemannSiegelZ
Riemann–Siegel Z-function Z(t) = e^{iθ(t)} ζ(1/2 + it) (real on the critical line)
Syntax
riemannSiegelZ(t)
siegelZ
Riemann–Siegel Z-function Z(t) = e^{iθ(t)} ζ(1/2 + it) (real on the critical line)
Syntax
siegelZ(t)
sinhIntegral
Hyperbolic sine / cosine integrals Shi(x) (odd) and Chi(x) = γ + ln x + ∫₀ˣ(cosh t − 1)/t dt (Chi(0) = −Infinity, x < 0 gives NaN)
Syntax
sinhIntegral(x)
sinIntegral
Sine / cosine integrals
Syntax
sinIntegral(x)
sphericalBesselI
Modified spherical Bessel i_n = √(π/2x)·I_{n+½}(x) and k_n = √(π/2x)·K_{n+½}(x) (so k₀(x) = (π/2)e^{−x}/x)
Syntax
sphericalBesselI(n, x)
sphericalBesselJ
Spherical Bessel j_n(x) = √(π/2x)·J_{n+½}(x) and y_n(x); at x = 0, j₀ = 1, j_n = 0 (n > 0), y_n = −Infinity; negative n throws RangeError
Syntax
sphericalBesselJ(n, x)
sphericalBesselK
Modified spherical Bessel i_n = √(π/2x)·I_{n+½}(x) and k_n = √(π/2x)·K_{n+½}(x) (so k₀(x) = (π/2)e^{−x}/x)
Syntax
sphericalBesselK(n, x)
sphericalBesselY
Spherical Bessel j_n(x) = √(π/2x)·J_{n+½}(x) and y_n(x); at x = 0, j₀ = 1, j_n = 0 (n > 0), y_n = −Infinity; negative n throws RangeError
Syntax
sphericalBesselY(n, x)
sphericalHarmonic
Spherical harmonic Y_l^m(θ, φ) as a Complex, Condon–Shortley phase, θ polar and φ azimuth; |m| > l gives 0
Syntax
sphericalHarmonic(l, m, theta, phi)
spheroidalAngular
Prolate angular function S_mn(c, η) on η ∈ [−1, 1] (S_mn(0, η) = P_n^m(η))
Syntax
spheroidalAngular(m, n, c, eta)
spheroidalCharacteristic
Prolate-spheroidal angular characteristic value λ_mn(c) (the second name is an alias; λ_mn(0) = n(n+1)); integers with 0 ≤ m ≤ n
Syntax
spheroidalCharacteristic(m, n, c)
spheroidalLambda
Prolate-spheroidal angular characteristic value λ_mn(c) (the second name is an alias; λ_mn(0) = n(n+1)); integers with 0 ≤ m ≤ n
Syntax
spheroidalLambda(m, n, c)
spheroidalRadial
Radial companion R_mn^{(1)}(c, ξ), ξ ≥ 1: the angular series continued off [−1, 1]; not normalized to j_n(cξ) at infinity
Syntax
spheroidalRadial(m, n, c, xi)
struveH
Struve function H_v(z) (power series, z >= 0)
Syntax
struveH(v, z)
struveL
Modified Struve function L_v(z) (power series, z >= 0)
Syntax
struveL(v, z)
trigamma
Trigamma function ψ'(x) (= polygamma(1, x))
Syntax
trigamma(x)
wigner3j
Wigner 3j symbol (Racah formula); integer or half-integer arguments, anything not a multiple of ½ throws RangeError, selection-rule violations return 0
Syntax
wigner3j(j1, j2, j3, m1, m2, m3)
wigner6j
Wigner 6j symbol {j1 j2 j3; j4 j5 j6} (Racah formula); wigner6j(1, 1, 1, 1, 1, 1) = 1/6
Syntax
wigner6j(j1, j2, j3, j4, j5, j6)
zeta
Riemann zeta function (factory layer)
Syntax
zeta(s)