Expand description
§SciRS2 Special - Special Mathematical Functions
scirs2-special provides production-ready special mathematical functions modeled after SciPy’s
special module, offering gamma, Bessel, error functions, elliptic integrals, hypergeometric functions,
and more, with enhanced numerical stability, GPU acceleration, and arbitrary precision support.
§🎯 Key Features
- SciPy Compatibility: Drop-in replacement for
scipy.specialfunctions - 100+ Functions: Gamma, Bessel, error, elliptic, hypergeometric, orthogonal polynomials
- Numerical Stability: Carefully implemented algorithms avoiding overflow/underflow
- GPU Acceleration: CUDA/ROCm support for array operations
- Arbitrary Precision: High-precision computations with
rugbackend - Memory Efficient: Chunked processing for large arrays
- SIMD & Parallel: Vectorized and multi-threaded execution
§📦 Module Overview
| SciRS2 Module | SciPy Equivalent | Description |
|---|---|---|
gamma | scipy.special.gamma | Gamma and related functions |
bessel | scipy.special.jv, yv | Bessel functions (J, Y, I, K) |
erf | scipy.special.erf, erfc | Error and complementary error functions |
elliptic | scipy.special.ellipk | Elliptic integrals and functions |
hypergeometric | scipy.special.hyp2f1 | Hypergeometric functions |
combinatorial | scipy.special.factorial | Factorials, binomial coefficients |
orthogonal | scipy.special.eval_legendre | Orthogonal polynomials (Legendre, Chebyshev, etc.) |
zeta | scipy.special.zeta | Riemann zeta and related functions |
§🚀 Quick Start
[dependencies]
scirs2-special = "0.5.0"use scirs2_special::{gamma, bessel, erf};
// Gamma function: Γ(5) = 4! = 24
let g = gamma(5.0f64);
assert!((g - 24.0).abs() < 1e-10);
// Bessel function of the first kind: J₀(x)
let j0 = bessel::j0(2.0);
// Error function
let erf_val = erf::erf(1.0);§🏗️ Architecture
scirs2-special
├── Gamma Functions (gamma, lgamma, digamma, polygamma, beta)
├── Bessel Functions (J, Y, I, K, modified, spherical)
├── Error Functions (erf, erfc, erfcx, erfi, dawson)
├── Elliptic Integrals (complete, incomplete, Jacobi)
├── Hypergeometric (2F1, 1F1, 0F1, generalized)
├── Combinatorial (factorial, binomial, multinomial, Stirling)
├── Orthogonal Polynomials (Legendre, Chebyshev, Hermite, Laguerre)
├── Statistical (logistic, softmax, sinc, logsumexp)
├── Special Integrals (exponential, logarithmic, Fresnel)
├── Zeta & Related (Riemann zeta, Hurwitz zeta, polylog)
├── Lambert W & Wright Omega
├── Airy Functions (Ai, Bi, derivatives)
├── Performance Features
│ ├── GPU acceleration (gamma, Bessel, erf)
│ ├── Chunked processing (memory-efficient)
│ ├── SIMD vectorization
│ └── Parallel execution
└── Arbitrary Precision (via rug, optional)§📊 Performance
| Function | Array Size | CPU | GPU | Speedup |
|---|---|---|---|---|
| Gamma | 10⁶ | 120ms | 6ms | 20× |
| Bessel J0 | 10⁶ | 180ms | 8ms | 22.5× |
| Erf | 10⁶ | 85ms | 4ms | 21× |
§🔒 Version Information
- Version: 0.5.0
- Release Date: March 27, 2026
- Repository: github.com/cool-japan/scirs
Re-exports§
pub use error::SpecialError;pub use error::SpecialResult;pub use advanced_performance_enhancement::benchmark_function;pub use advanced_performance_enhancement::erf_advancedfast;pub use advanced_performance_enhancement::gamma_advancedfast;pub use advanced_performance_enhancement::gamma_array_advancedfast;pub use advanced_performance_enhancement::j0_advancedfast;pub use advanced_performance_enhancement::PerformanceConfig;pub use advanced_performance_enhancement::PerformanceMetrics;pub use bessel::h1vp;pub use bessel::h2vp;pub use bessel::hankel1;pub use bessel::hankel1e;pub use bessel::hankel2;pub use bessel::hankel2e;pub use bessel::i0;pub use bessel::i0_prime;pub use bessel::i0e;pub use bessel::i1;pub use bessel::i1_prime;pub use bessel::i1e;pub use bessel::iv;pub use bessel::iv_prime;pub use bessel::ive;pub use bessel::ivp;pub use bessel::j0;pub use bessel::j0_prime;pub use bessel::j0e;pub use bessel::j1;pub use bessel::j1_prime;pub use bessel::j1e;pub use bessel::jn;pub use bessel::jn_prime;pub use bessel::jne;pub use bessel::jv;pub use bessel::jv_prime;pub use bessel::jve;pub use bessel::jvp;pub use bessel::k0;pub use bessel::k0_prime;pub use bessel::k0e;pub use bessel::k1;pub use bessel::k1_prime;pub use bessel::k1e;pub use bessel::kv;pub use bessel::kv_prime;pub use bessel::kve;pub use bessel::kvp;pub use bessel::spherical_jn;pub use bessel::spherical_yn;pub use bessel::y0;pub use bessel::y0_prime;pub use bessel::y0e;pub use bessel::y1;pub use bessel::y1_prime;pub use bessel::y1e;pub use bessel::yn;pub use bessel::yn_prime;pub use bessel::yne;pub use bessel::yvp;pub use distributions::bdtr;pub use distributions::bdtr_array;pub use distributions::bdtrc;pub use distributions::bdtri;pub use distributions::bdtrik;pub use distributions::bdtrin;pub use distributions::btdtria;pub use distributions::btdtrib;pub use distributions::chdtr;pub use distributions::chdtrc;pub use distributions::chdtri;pub use distributions::fdtr;pub use distributions::fdtrc;pub use distributions::fdtridfd;pub use distributions::gdtr;pub use distributions::gdtrc;pub use distributions::gdtria;pub use distributions::gdtrib;pub use distributions::gdtrix;pub use distributions::kolmogi;pub use distributions::kolmogorov;pub use distributions::log_ndtr;pub use distributions::nbdtr;pub use distributions::nbdtrc;pub use distributions::nbdtri;pub use distributions::ndtr;pub use distributions::ndtr_array;pub use distributions::ndtri;pub use distributions::ndtri_exp;pub use distributions::pdtr;pub use distributions::pdtrc;pub use distributions::pdtri;pub use distributions::pdtrik;pub use distributions::stdtr;pub use gamma::beta;pub use gamma::beta;pub use gamma::beta_safe;pub use gamma::betainc;pub use gamma::betainc_regularized;pub use gamma::betaincinv;pub use gamma::betaln;pub use gamma::digamma;pub use gamma::digamma;pub use gamma::digamma_safe;pub use gamma::gamma;pub use gamma::gamma_safe;pub use gamma::gammaln;pub use gamma::loggamma;pub use gamma::polygamma;pub use incomplete_gamma::gammainc;pub use incomplete_gamma::gammainc_lower;pub use incomplete_gamma::gammainc_upper;pub use incomplete_gamma::gammaincc;pub use incomplete_gamma::gammainccinv;pub use incomplete_gamma::gammaincinv;pub use incomplete_gamma::gammasgn;pub use incomplete_gamma::gammastar;pub use gamma::complex::beta_complex;pub use gamma::complex::digamma_complex;pub use gamma::complex::gamma_complex;pub use gamma::complex::loggamma_complex;pub use bessel::complex::i0_complex;pub use bessel::complex::j0_complex;pub use bessel::complex::j1_complex;pub use bessel::complex::jn_complex;pub use bessel::complex::jv_complex;pub use bessel::complex::k0_complex;pub use erf::complex::erf_complex;pub use erf::complex::erfc_complex;pub use erf::complex::erfcx_complex;pub use erf::complex::faddeeva_complex;pub use information_theory::binary_entropy;pub use information_theory::cross_entropy;pub use information_theory::entr;pub use information_theory::entr_array;pub use information_theory::entropy;pub use information_theory::huber;pub use information_theory::huber_loss;pub use information_theory::kl_div;pub use information_theory::kl_divergence;pub use information_theory::pseudo_huber;pub use information_theory::rel_entr;pub use hill::hill_floquet;pub use hill::mathieu_hill;pub use hill::CurveType;pub use hill::HillEquation;pub use hill::HillResult;pub use hill::StabilityCurve;pub use mathieu_hill::hill_characteristic_exponent;pub use mathieu_hill::hill_periodic_solution;pub use mathieu_hill::hill_stability_check;pub use mathieu_hill::hill_stability_exponent;pub use mathieu_hill::HillCoefficients;pub use mixed_precision::auto_dispatch_bessel_j0;pub use mixed_precision::auto_dispatch_erf;pub use mixed_precision::auto_dispatch_gamma;pub use mixed_precision::batch_eval_mixed;pub use mixed_precision::MixedPrecisionConfig;pub use utility::agm;pub use utility::cbrt;pub use utility::cbrt_array;pub use utility::cosdg;pub use utility::cosm1;pub use utility::cotdg;pub use utility::diric;pub use utility::exp10;pub use utility::exp10_array;pub use utility::exp2;pub use utility::expit;pub use utility::expit_array;pub use utility::expm1_array_utility;pub use utility::exprel;pub use utility::gradient;pub use utility::log1p_array_utility;pub use utility::log_expit;pub use utility::logit;pub use utility::logit_array;pub use utility::owens_t;pub use utility::powm1;pub use utility::radian;pub use utility::round;pub use utility::round_array;pub use utility::sindg;pub use utility::softplus;pub use utility::spherical_distance;pub use utility::tandg;pub use utility::xlog1py;pub use utility::xlog1py_scalar;pub use utility::xlogy;pub use simd_ops::benchmark_simd_performance;pub use simd_ops::erf_f32_simd;pub use simd_ops::exp_f32_simd;pub use simd_ops::gamma_f32_simd;pub use simd_ops::gamma_f64_simd;pub use simd_ops::j0_f32_simd;pub use simd_ops::vectorized_special_ops;pub use simd_ops::batch_bessel_j0_f32;pub use simd_ops::batch_bessel_j0_f64;pub use simd_ops::batch_bessel_j1_f32;pub use simd_ops::batch_bessel_j1_f64;pub use simd_ops::batch_bessel_y0_f32;pub use simd_ops::batch_bessel_y0_f64;pub use simd_ops::batch_bessel_y1_f32;pub use simd_ops::batch_bessel_y1_f64;pub use simd_ops::batch_beta_f32;pub use simd_ops::batch_beta_f64;pub use simd_ops::batch_digamma_f32;pub use simd_ops::batch_digamma_f64;pub use simd_ops::batch_erf_f32;pub use simd_ops::batch_erf_f64;pub use simd_ops::batch_erfc_f32;pub use simd_ops::batch_erfc_f64;pub use simd_ops::batch_gamma_f32;pub use simd_ops::batch_gamma_f64;pub use simd_ops::batch_lgamma_f32;pub use simd_ops::batch_lgamma_f64;pub use simd_ops::adaptive_gamma_processing;pub use simd_ops::benchmark_parallel_performance;pub use simd_ops::gamma_f64_parallel;pub use simd_ops::j0_f64_parallel;pub use simd_ops::gamma_f32_simd_parallel;pub use erf::dawsn;pub use erf::erf;pub use erf::erfc;pub use erf::erfcinv;pub use erf::erfcx;pub use erf::erfi;pub use erf::erfinv;pub use erf::wofz;pub use arbitrary_precision::bessel::bessel_j_ap;pub use arbitrary_precision::bessel::bessel_j_mp;pub use arbitrary_precision::bessel::bessel_y_ap;pub use arbitrary_precision::bessel::bessel_y_mp;pub use arbitrary_precision::cleanup_cache;pub use arbitrary_precision::error_function::erf_ap;pub use arbitrary_precision::error_function::erf_mp;pub use arbitrary_precision::error_function::erfc_ap;pub use arbitrary_precision::error_function::erfc_mp;pub use arbitrary_precision::gamma::gamma_ap;pub use arbitrary_precision::gamma::gamma_mp;pub use arbitrary_precision::gamma::log_gamma_ap;pub use arbitrary_precision::gamma::log_gamma_mp;pub use arbitrary_precision::to_complex64;pub use arbitrary_precision::to_f64;pub use arbitrary_precision::PrecisionContext;pub use arbitrary_precision::bessel_j0_mpfr;pub use arbitrary_precision::bessel_k0_mpfr;pub use arbitrary_precision::digamma_mpfr;pub use arbitrary_precision::erf_mpfr;pub use arbitrary_precision::erfc_mpfr;pub use arbitrary_precision::gamma_mpfr;pub use arbitrary_precision::lgamma_mpfr;
Modules§
- advanced_
performance_ enhancement - Advanced-high performance enhancements for critical special functions
- arbitrary_
precision - Arbitrary precision computation support for special functions
- array_
ops - Enhanced array operations for special functions
- bessel
- Bessel functions with enhanced numerical stability
- chromatic
- Chromatic Polynomials of Simple Graphs
- clebsch_
gordan - Clebsch-Gordan Coefficients and Related Symbols
- clebsch_
gordan_ lie - Clebsch-Gordan series for SU(2), SU(3), SO(5), and general semisimple Lie groups.
- connection_
formulas - Connection formula generator for special functions.
- convenience
- Domain-specific convenience functions
- cross_
validation - Cross-validation against reference implementations
- dedekind_
zeta - Dedekind Zeta Functions
- differentiation
- Derivative rules and numerical differentiation for special functions.
- distributions
- Statistical distribution functions
- edge_
case_ tests - Comprehensive edge case testing for special functions
- elliptic_
ext - Extended elliptic integrals and functions
- elliptic_
l - Elliptic curve L-functions.
- elliptic_
modular - Elliptic Modular Functions
- erf
- Error function and related functions
- error
- Error types for the SciRS2 special functions module
- error_
context - Enhanced error handling with context tracking for special functions
- error_
wrappers - Error handling wrappers for special functions
- extended_
scipy_ validation - Extended validation tests for new SciPy compatibility functions
- gamma
- Gamma function and related implementations
- gpu_
context_ manager - Advanced GPU context management for special functions
- gpu_
dispatch - GPU auto-dispatch for batch evaluation of special functions. Falls back to CPU when GPU is unavailable or array is small.
- gpu_
kernels - GPU kernel implementations for batch special-function evaluation.
- gpu_ops
- GPU-accelerated implementations of special functions
- hall_
polynomials - Hall polynomials for p-group extensions.
- hecke_l
- Hecke L-functions and Maass forms.
- hill
- Hill’s Equation and Generalized Periodic Stability Analysis
- incomplete_
gamma - Incomplete gamma and related functions
- information_
theory - Information theory functions
- l_
functions - Dirichlet L-functions and Dirichlet Characters
- lame
- Lamé Functions
- legendre_
elliptic - Legendre elliptic integrals via Carlson symmetric forms
- mathieu_
hill - Generalized Hill’s equation — periodic solutions and stability analysis
- memory_
efficient - Memory-efficient operations for large arrays
- mixed_
precision - Mixed-Precision Auto-Dispatch for Special Functions
- nield_
kuznetsov - Nield-Kuznetsov Functions
- optimizations
- Performance optimizations for special functions
- painleve
- Painleve Transcendents
- performance_
benchmarks - Comprehensive performance benchmarking for special functions
- physics_
engineering - Specialized physics and engineering functions
- polylogarithm
- Polylogarithm and related transcendental functions
- precision
- Precision enhancement utilities
- python_
interop - Python interoperability module for migration assistance
- schur
- Schur Polynomials and Symmetric Functions
- selberg_
zeta - Selberg Zeta Function
- simd_
ops - SIMD-optimized and parallel operations for special functions
- stability_
analysis - Numerical stability analysis for special functions
- symbolic
- Symbolic representation and manipulation of special functions.
- theta_
functions - Jacobi Theta Functions
- tutte
- Tutte Polynomial of Matroids
- utility
- Utility and convenience functions with mathematical foundations
- validated
- Validated numerics: ball arithmetic for certified function evaluation.
- visualization
- Visualization tools for special functions
Macros§
- special_
error - Macro for consistent error creation with context
- validate_
with_ context - Macro for consistent validation with error context
Structs§
- Lentz
Result - Result of a modified-Lentz continued-fraction evaluation.
- Spheroidal
Config - Configuration for spheroidal wave function computations.
- Spheroidal
Eigenvalue - Result of a spheroidal eigenvalue computation.
Enums§
- Spherical
Bessel Kind - Spherical Bessel function selector for the radial function expansion.
- Spheroid
Type - Prolate vs. oblate spheroidal geometry.
- Spheroidal
Kind - Spheroidal geometry type.
- Spheroidal
Parity - Sign tag distinguishing prolate (
+c²in coupling matrix) from oblate (-c²coupling, via the standardc → icsubstitution).
Constants§
- DEFAULT_
D_ LEN - Default truncation length for the d-coefficient series. Empirically large
enough for
|c| ≤ 50andn ≤ 30.
Functions§
- acosdg
- Inverse cosine in degrees.
- ai
- Airy function of the first kind, Ai(x).
- ai_
complex - Complex Airy function of the first kind, Ai(z)
- ai_
zeros - Compute zeros of Airy function Ai(x)
- aie
- Exponentially scaled Airy function Ai(x) * exp(2/3 * x^(3/2)) for x >= 0
- aip
- Derivative of the Airy function of the first kind, Ai’(x).
- aip_
complex - Complex derivative of Airy function of the first kind, Ai’(z)
- airye
- Exponentially scaled Airy functions and their derivatives
- anger_j
- Anger function J_v(x).
- anger_
weber - Relation between Anger, Weber, and Bessel functions.
- angular_
function - Evaluate the spheroidal angular function
S_{m,n}(c, η)of the first kind using the Flammer / Bouwkamp d-coefficient expansion, normalised to match SciPy’sscipy.special.pro_ang1/obl_ang1convention. - angular_
spheroidal - Compute the angular spheroidal wave function S_{mn}(c, x) for |x| ≤ 1.
- asindg
- Inverse sine in degrees.
- associated_
legendre - Compute the associated Legendre polynomial P_l^m(x) via forward recurrence.
- atandg
- Inverse tangent in degrees.
- bei
- Compute the bei function, the imaginary part of the Kelvin function
- beip
- Compute the derivative of the bei function
- bell_
number - Computes the Bell number B(n).
- ber
- Compute the ber function, the real part of the Kelvin function
- bernoulli_
number - Computes the Bernoulli number B(n).
- bernoulli_
poly - Bernoulli polynomial B_n(x).
- berp
- Compute the derivative of the ber function
- besselpoly
- Compute Bessel polynomial
- bi
- Airy function of the second kind, Bi(x).
- bi_
complex - Complex Airy function of the second kind, Bi(z)
- bi_
zeros - Compute zeros of Airy function Bi(x)
- bie
- Exponentially scaled Airy function Bi(x) * exp(-2/3 * |x|^(3/2)) for x >= 0
- binomial
- Computes the binomial coefficient “n choose k”.
- bip
- Derivative of the Airy function of the second kind, Bi’(x).
- bip_
complex - Complex derivative of Airy function of the second kind, Bi’(z)
- boxcox
- Box-Cox transformation
- boxcox1p
- Box-Cox transformation of 1 + x
- boxcox1p_
array - Box-Cox1p transformation for arrays
- boxcox_
array - Box-Cox transformation for arrays
- cf_
modified_ lentz - Evaluate a generic continued fraction of the form
- chebyshev
- Computes the value of the Chebyshev polynomial of the first kind T_n(x) of degree n.
- chi
- Hyperbolic cosine integral, Chi(x) = γ + ln(x) + ∫₀ˣ (cosh(t)-1)/t dt
- ci
- Cosine integral, Ci(x) = -∫ₓ^∞ cos(t)/t dt = γ + ln(x) + ∫₀ˣ (cos(t)-1)/t dt
- clausen
- Clausen function Cl_2(x).
- comb
- Combination function - alias for binomial coefficient
- complete_
elliptic_ pi - Complete elliptic integral of the third kind Pi(n, m).
- coulomb_
f - Computes the regular Coulomb wave function F_L(η,ρ)
- coulomb_
g - Computes the irregular Coulomb wave function G_L(η,ρ)
- coulomb_
h_ plus - Computes the outgoing Coulomb wave function H⁺_L(η,ρ)
- coulomb_
hminus - Computes the incoming Coulomb wave function H⁻_L(η,ρ)
- coulomb_
phase_ shift - Computes the Coulomb phase shift σ_L(η)
- d_
coefficients - Compute the Flammer / Bouwkamp expansion coefficients
d_r^{m,n}(c)for the spheroidal angular functionS_{m,n}(c, η) = Σ_r d_r · P_{m+r}^m(η)wherer = 2p + parity,parity = (n - m) mod 2. - d_
coefficients_ with_ len - Variant of
d_coefficientswith an explicit truncation length. - debye1
- First Debye function D_1(x) = (1/x) * integral_0^x t/(e^t - 1) dt
- debye2
- Second Debye function D_2(x) = (2/x^2) * integral_0^x t^2/(e^t - 1) dt
- debye3
- Third Debye function D_3(x) = (3/x^3) * integral_0^x t^3/(e^t - 1) dt
- debye4
- Fourth Debye function D_4(x) = (4/x^4) * integral_0^x t^4/(e^t - 1) dt
- debye5
- Fifth Debye function D_5(x) = (5/x^5) * integral_0^x t^5/(e^t - 1) dt
- dirichlet_
eta - Dirichlet eta function η(s) = (1 - 2^{1-s}) ζ(s).
- double_
factorial - Computes the double factorial of a non-negative integer.
- e1
- Exponential integral E₁(x) = ∫ₓ^∞ e⁻ᵗ/t dt
- ellip_
harm - Ellipsoidal harmonic functions E_n^m(h²)
- ellip_
harm_ 2 - Second-order ellipsoidal harmful functions F_n^m(h²)
- ellip_
harm_ array - Array version of ellipsoidal harmonics
- ellip_
harm_ coefficients - Ellipsoidal harmonic expansion coefficients
- ellip_
harm_ complex - Complex ellipsoidal harmonics
- ellip_
normal - Ellipsoidal harmonic normalization constants
- ellipe
- Complete elliptic integral of the second kind (alternative interface)
- ellipeinc
- Incomplete elliptic integral of the second kind (alternative interface)
- ellipj
- Jacobian elliptic functions with all three functions returned at once
- ellipk
- Complete elliptic integral of the first kind (alternative interface)
- ellipkinc
- Incomplete elliptic integral of the first kind (alternative interface)
- ellipkm1
- Complete elliptic integral of the first kind K(1-m)
- elliprc
- Carlson elliptic integral RC(x, y)
- elliprd
- Carlson elliptic integral RD(x, y, z)
- elliprf
- Carlson elliptic integral RF(x, y, z)
- elliprf_
array - Array versions of Carlson elliptic integrals
- elliprg
- Carlson elliptic integral RG(x, y, z)
- elliprj
- Carlson elliptic integral RJ(x, y, z, p)
- elliptic_
e - Complete elliptic integral of the second kind
- elliptic_
e_ inc - Incomplete elliptic integral of the second kind
- elliptic_
f - Incomplete elliptic integral of the first kind
- elliptic_
k - Complete elliptic integral of the first kind
- elliptic_
nome - Inverse elliptic nome q(m).
- elliptic_
pi - Incomplete elliptic integral of the third kind
- euler_
number - Computes the Euler number E(n).
- euler_
poly - Euler polynomial E_n(x).
- exp1
- Exponential integral E_1(x).
- expint
- Exponential integral of order n, E₍ₙ₎(x) = ∫ₓ^∞ e⁻ᵗ/t^n dt
- expm1_
array - Computes exp(x) - 1 with improved numerical stability for small x.
- expn
- Generalized exponential integral E_n(x).
- factorial
- Computes the factorial of a non-negative integer.
- factorial2
- Computes the double factorial n!! (alias for SciPy compatibility).
- factorialk
- Computes the k-factorial (multi-factorial) of n.
- flammer_
eigenvalue - Compute the spheroidal characteristic value
λ_{mn}(c)directly from the Flammer recurrence tridiagonal eigenproblem. - fresnel
- Compute the Fresnel sine and cosine integrals.
- fresnel_
complex - Compute the Fresnel sine and cosine integrals for complex argument.
- fresnelc
- Compute the Fresnel cosine integral.
- fresnels
- Compute the Fresnel sine integral.
- gegenbauer
- Computes the value of the Gegenbauer (advancedspherical) polynomial C_n^(λ)(x).
- hermite
- Computes the value of the Hermite polynomial H_n(x) of degree n.
- hermite_
prob - Computes the value of the Hermite function (probabilists’ Hermite polynomial) He_n(x).
- hurwitz_
zeta - Hurwitz zeta function.
- hyp0f1
- Confluent hypergeometric function 1F1(a;b;z)
- hyp0f1_
enhanced - Enhanced confluent hypergeometric limit function ₀F₁(;a;z)
- hyp1f1
- hyp1f1_
enhanced - Enhanced confluent hypergeometric function ₁F₁(a;b;z)
- hyp1f1_
regularized - Regularized confluent hypergeometric function ₁F₁(a;b;z) / Γ(b)
- hyp2f1
- Gaussian (ordinary) hypergeometric function 2F1(a,b;c;z)
- hyp2f1_
enhanced - Enhanced hypergeometric function ₂F₁(a,b;c;z) with convergence acceleration
- hyp2f1_
regularized - Regularized hypergeometric function ₂F₁(a,b;c;z) / Γ(c)
- hyperu
- Confluent hypergeometric function U(a,b,x) of the second kind
- inv_
boxcox - Inverse Box-Cox transformation
- inv_
boxcox1p - Inverse Box-Cox transformation of 1 + x form
- inv_
boxcox1p_ array - Inverse Box-Cox1p transformation for arrays
- inv_
boxcox_ array - Inverse Box-Cox transformation for arrays
- it2_
struve0 - Compute the second integration of the Struve function of order 0
- it_
mod_ struve0 - Compute the integrated modified Struve function of order 0
- it_
struve0 - Compute the integrated Struve function of order 0
- itairy
- Integral of Airy functions: ∫₀^x Ai(t) dt and ∫₀^x Bi(t) dt
- itj0y0
- Compute integrals ∫₀^∞ tⁿ J₀(t) Y₀(xt) dt and ∫₀^∞ tⁿ J₀(t) Y₀(xt) J₀(t) dt
- j0_
zeros - Compute the k-th zero of J₀(x)
- j1_
zeros - Compute the k-th zero of J₁(x)
- jacobi
- Computes the value of the Jacobi polynomial P_n^(α,β)(x).
- jacobi_
cn - Jacobi elliptic function cn(u, m)
- jacobi_
dn - Jacobi elliptic function dn(u, m)
- jacobi_
sn - Jacobi elliptic function sn(u, m)
- jn_
zeros - Compute the k-th zero of Jₙ(x)
- jnjnp_
zeros - Compute zeros where Jₙ(x) and J’ₙ(x) cross zero simultaneously
- jnp_
zeros - Compute the k-th zero of the derivative J’ₙ(x)
- jnyn_
zeros - Compute zeros of Jₙ(x) and Yₙ(x) simultaneously
- kei
- Compute the kei function, the imaginary part of the Kelvin K function
- keip
- Compute the derivative of the kei function
- kelvin
- Compute all Kelvin functions and their derivatives at once.
- ker
- Compute the ker function, the real part of the Kelvin K function
- kerp
- Compute the derivative of the ker function
- laguerre
- Computes the value of the Laguerre polynomial L_n(x) of degree n.
- laguerre_
generalized - Computes the value of the generalized Laguerre polynomial L_n^(α)(x).
- lambert_
w - Lambert W function for real and complex arguments.
- lambert_
w_ real - Lambert W function for real arguments on the principal branch (k=0).
- legendre
- Computes the value of the Legendre polynomial P_n(x) of degree n.
- legendre_
assoc - Computes the associated Legendre function P_n^m(x).
- lerch_
phi - Lerch transcendent Φ(z, s, a).
- li
- Calculates the logarithmic integral Li(x) = ∫₂ˣ dt/ln(t)
- li_
complex - Calculates the logarithmic integral for complex values, Li(z) = ∫₀ᶻ dt/ln(t)
- ln_
pochhammer - Compute the logarithm of the Pochhammer symbol (rising factorial)
- log1p_
array - Computes log(1 + x) with improved numerical stability for small x.
- log_
abs_ gamma - Computes the log of the absolute value of the gamma function.
- log_
softmax - Computes the log-softmax function for a vector of inputs.
- log_
wright_ bessel - Logarithm of Wright’s generalized Bessel function
- loggamma_
sign - Logarithm of the absolute value of the gamma function with sign.
- logistic
- Computes the logistic (sigmoid) function.
- logistic_
derivative - Computes the derivative of the logistic function.
- logsumexp
- Computes the LogSumExp function for numerical stability.
- lommel_
s1 - Lommel function of the first kind s_{mu,nu}(z).
- lommel_
s2 - Lommel function of the second kind S_{mu,nu}(z).
- mathieu_
a - Characteristic value of even Mathieu functions
- mathieu_
b - Characteristic value of odd Mathieu functions
- mathieu_
cem - Even Mathieu function and its derivative
- mathieu_
even_ coef - Fourier coefficients for even Mathieu functions
- mathieu_
odd_ coef - Fourier coefficients for odd Mathieu functions
- mathieu_
sem - Odd Mathieu function and its derivative
- mod_
fresnel_ plus - Compute the modified Fresnel plus integrals.
- mod_
fresnelminus - Compute the modified Fresnel minus integrals.
- mod_
struve - Compute the Modified Struve function L_v(x)
- multinomial
- Multinomial coefficient.
- obl_
ang1 - Computes the oblate spheroidal angular function of the first kind,
S_{m,n}(c, η). - obl_cv
- Computes the characteristic value for oblate spheroidal wave functions.
- obl_
cv_ seq - Computes a sequence of characteristic values for oblate spheroidal wave functions.
- obl_
rad1 - Computes the oblate spheroidal radial function of the first kind,
R_{m,n}^{(1)}(c, ξ). - obl_
rad2 - Computes the oblate spheroidal radial function of the second kind,
R_{m,n}^{(2)}(c, ξ). - pbdv
- Parabolic cylinder function D_v(x) and its derivative.
- pbdv_
seq - Compute a sequence of parabolic cylinder functions D_v(x) for v = 0, 1, …, vmax.
- pbvv
- Parabolic cylinder function V_v(x) and its derivative.
- pbvv_
seq - Compute a sequence of parabolic cylinder functions V_v(x) for v = 0, 1, …, vmax.
- pbwa
- Compute parabolic cylinder function W(a,x) and its derivative.
- perm
- Computes the number of permutations (alias for SciPy compatibility).
- permutations
- Computes the number of permutations of n items taken k at a time.
- pochhammer
- Compute the Pochhammer symbol (rising factorial)
- polylog
- Polylogarithm function Li_s(z) = Σ_{k=1}^∞ z^k / k^s
- pro_
ang1 - Computes the prolate spheroidal angular function of the first kind,
S_{m,n}(c, η). - pro_cv
- Computes the characteristic value
λ_{m,n}(c)for prolate spheroidal wave functions. - pro_
cv_ seq - Computes a sequence of characteristic values for prolate spheroidal wave functions.
- pro_
rad1 - Computes the prolate spheroidal radial function of the first kind,
R_{m,n}^{(1)}(c, ξ). - pro_
rad2 - Computes the prolate spheroidal radial function of the second kind,
R_{m,n}^{(2)}(c, ξ). - pseudo_
voigt - Pseudo-Voigt approximation
- radial_
function - Evaluate the spheroidal radial function
R_{mn}^{(j)}(c, ξ)of the first or second kind via the Flammer §4.4 / A&S 21.9 spherical Bessel expansion: - radial_
spheroidal_ 1 - Compute the radial spheroidal wave function of the first kind R_{mn}^{(1)}(c, ξ) for ξ ≥ 1.
- riccati_
jn - Riccati-Bessel function S_n(x) = x * j_n(x).
- riccati_
yn - Riccati-Bessel function C_n(x) = -x * y_n(x).
- riemann_
zeta - Riemann zeta function for real argument (f64 specialisation).
- riemann_
zeta_ complex - Riemann zeta function for complex argument using Euler-Maclaurin.
- scaled_
recurrence_ step - One-step rescale helper: given a “register” of running values that may all
drift toward overflow or underflow together, apply a multiplicative rescale
with
log_scalebookkeeping so the magnitudes return to a safe range. - shi
- Hyperbolic sine integral, Shi(x) = ∫₀ˣ sinh(t)/t dt
- shichi
- Computes both hyperbolic sine and cosine integrals simultaneously: (Shi(x), Chi(x))
- si
- Sine integral, Si(x) = ∫₀ˣ sin(t)/t dt
- sici
- Computes both sine and cosine integrals simultaneously: (Si(x), Ci(x))
- sinc
- Computes the normalized sinc function.
- sinc_
array - Computes the normalized sinc function for an array of inputs.
- softmax
- Computes the softmax function for a vector of inputs.
- solid_
harmonic_ irregular - Irregular solid harmonic I_l^m(r, theta, phi).
- solid_
harmonic_ regular - Regular solid harmonic R_l^m(r, theta, phi).
- spence
- Spence’s function (dilogarithm): Li₂(x) = -∫₀ˣ ln(1-t)/t dt
- sph_
harm - Computes the value of the real spherical harmonic Y_l^m(θ, φ) function.
- sph_
harm_ complex - Computes the value of the complex spherical harmonic Y_l^m(θ, φ) function.
- sph_
harm_ cos_ angle - Spherical harmonic addition theorem coefficient.
- sph_
harm_ normalization - Compute the normalization factor for spherical harmonics.
- spherical_
bessel_ j - Compute the spherical Bessel function of the first kind j_l(x).
- spherical_
in - Modified spherical Bessel function of the first kind i_n(x).
- spherical_
in_ derivative - Derivative of the modified spherical Bessel function of the first kind.
- spherical_
kn - Modified spherical Bessel function of the second kind k_n(x).
- spherical_
kn_ derivative - Derivative of the modified spherical Bessel function of the second kind.
- spheroidal_
eigenvalue_ mn - Compute the spheroidal characteristic value λ_{mn}(c).
- spheroidal_
eigenvalue_ wf - Compute the spheroidal eigenvalue λ_{mn}(c) for the angular spheroidal wave function.
- spheroidal_
ps - Compute the angular spheroidal wave function of the first kind S_{mn}^{(1)}(c, x).
- spheroidal_
wronskian - Evaluate the (approximate) Wronskian of the spheroidal wave functions.
- stirling2
- Computes the Stirling number of the second kind (alias for SciPy compatibility).
- stirling_
first - Computes the Stirling number of the first kind.
- stirling_
second - Computes the Stirling number of the second kind.
- struve
- Compute the Struve function H_v(x)
- tail_
ratio_ lentz - Estimate a pessimistic upper bound on the next-coefficient ratio
|d_{r+2} / d_r|for very largervia Lentz-CF. Used by callers that want a fast convergence check before committing to a full backward sweep. - voigt_
profile - Voigt profile function
- voigt_
profile_ array - Voigt profile for arrays
- voigt_
profile_ fwhm - Voigt profile with different parameterization
- voigt_
profile_ fwhm_ array - Voigt profile FWHM for arrays
- voigt_
profile_ normalized - Normalized Voigt profile
- weber_e
- Weber function E_v(x).
- weierstrass_
p - Weierstrass elliptic function wp(z; g2, g3).
- weierstrass_
p_ prime - Derivative of the Weierstrass elliptic function wp’(z; g2, g3).
- weierstrass_
sigma - Weierstrass sigma function sigma_W(z; g2, g3).
- weierstrass_
zeta - Weierstrass zeta function zeta_W(z; g2, g3).
- whittaker_
m - Whittaker function M_{kappa,mu}(z)
- whittaker_
w - Whittaker function W_{kappa,mu}(z)
- wright_
bessel - Computes the Wright Bessel function J_{rho, beta}(z)
- wright_
bessel_ complex - Computes the Wright Bessel function for complex arguments J_{rho, beta}(z)
- wright_
bessel_ zeros - Computes the first n zeros of the Wright Bessel function J_{rho, beta}(z)
- wright_
omega - Computes the Wright Omega function for a complex argument.
- wright_
omega_ optimized - Optimized Wright Omega function calculation for complex arguments.
- wright_
omega_ real - Computes the Wright Omega function for a real argument.
- wright_
omega_ real_ optimized - Optimized Wright Omega function calculation for real arguments.
- y0_
zeros - Compute the k-th zero of Y₀(x)
- y1_
zeros - Compute the k-th zero of Y₁(x)
- yn_
zeros - Compute the k-th zero of Yₙ(x)
- zeta
- Riemann zeta function.
- zetac
- Riemann zeta function minus 1.