Skip to main content

Crate xsf

Crate xsf 

Source
Expand description

This crate provides pure Rust implementations of scipy.special functions, translated from the xsf C++ library that powers scipy.special.

Most of the scipy.special functions are available. See the scipy.special documentation for additional information.

docs/accuracy.md compares the accuracy of many of these functions with that of xsf and, where available, the Rust standard library.

§Airy functions

FunctionDescription
airyAiry functions and derivatives
airy_scaledExponentially scaled Airy functions and derivatives
airy_ai_zerosZeros and values of the Airy function Ai and its derivative
airy_bi_zerosZeros and values of the Airy function Bi and its derivative
airy_integralsIntegrals of Airy functions

§Elliptic functions and integrals

FunctionDescription
ellipjJacobian elliptic functions
ellipkComplete elliptic integral of the first kind
ellipkm1Complete elliptic integral of the first kind around $m = 1$
ellipkincIncomplete elliptic integral of the first kind
ellipeComplete elliptic integral of the second kind
ellipeincIncomplete elliptic integral of the second kind
elliprcDegenerate symmetric elliptic integral
elliprdSymmetric elliptic integral of the second kind
elliprfCompletely-symmetric elliptic integral of the first kind
elliprgCompletely-symmetric elliptic integral of the second kind
elliprjSymmetric elliptic integral of the third kind

§Ellipsoidal harmonics

FunctionDescription
ellip_harmEllipsoidal harmonic functions $E^p_n(s)$
ellip_harm_2Ellipsoidal harmonic functions $F^p_n(s)$
ellip_normalEllipsoidal harmonic normalization constants $\gamma^p_n$

§Bessel functions

FunctionDescription
bessel_jBessel function of the first kind, $J_v(z)$
bessel_jeExponentially scaled Bessel function of the first kind
bessel_yBessel function of the second kind, $Y_v(z)$
bessel_yeExponentially scaled Bessel function of the second kind
bessel_iModified Bessel function of the first kind, $I_v(z)$
bessel_ieExponentially scaled modified Bessel function of the first kind
bessel_kModified Bessel function of the second kind, $K_v(z)$
bessel_keExponentially scaled modified Bessel function of the second kind
hankel_1Hankel function of the first kind, $H_v^{(1)}(z)$
hankel_1eExponentially scaled Hankel function of the first kind
hankel_2Hankel function of the second kind, $H_v^{(2)}(z)$
hankel_2eExponentially scaled Hankel function of the second kind
wright_besselWright’s generalized Bessel function
log_wright_besselNatural logarithm of Wright’s generalized Bessel function
jahnke_emden_lambdaJahnke-Emden Lambda function $\Lambda_{\nu}(x)$ and derivatives
iv_ratioRatio $I_v(x) / I_{v-1}(x)$ of modified Bessel functions
iv_ratio_cComplement of iv_ratio, $1 - I_v(x) / I_{v-1}(x)$
iv_ratioinvInverse of iv_ratio with respect to $x$

§Zeros of Bessel functions

FunctionDescription
bessel_zerosZeros of Bessel functions $J_v(x)$, $J_v'(x)$, $Y_v(x)$, and $Y_v'(x)$
bessel_j_jprime_zerosZeros of all $J_n(x)$ and $J_n'(x)$, in ascending order
bessel_y0_zerosReal or complex zeros of $Y_0(z)$
bessel_y1_zerosReal or complex zeros of $Y_1(z)$
bessel_y1_prime_zerosReal or complex zeros of $Y_1'(z)$

§Faster versions of common Bessel functions

FunctionDescription
bessel_j0Bessel function of the first kind of order 0, $J_0(x)$
bessel_j1Bessel function of the first kind of order 1, $J_1(x)$
bessel_y0Bessel function of the second kind of order 0, $Y_0(x)$
bessel_y1Bessel function of the second kind of order 1, $Y_1(x)$
bessel_i0Modified Bessel function of the first kind of order 0, $I_0(x)$
bessel_i0eExponentially scaled modified Bessel function of the first kind of order 0
bessel_i1Modified Bessel function of the first kind of order 1, $I_1(x)$
bessel_i1eExponentially scaled modified Bessel function of the first kind of order 1
bessel_k0Modified Bessel function of the second kind of order 0, $K_0(x)$
bessel_k0eExponentially scaled modified Bessel function of the second kind of order 0
bessel_k1Modified Bessel function of the second kind of order 1, $K_1(x)$
bessel_k1eExponentially scaled modified Bessel function of the second kind of order 1

§Integrals of Bessel functions

FunctionDescription
it1j0y0Integrals of Bessel functions of order 0
it2j0y0Integrals related to Bessel functions of order 0
it1i0k0Integrals of modified Bessel functions of order 0
it2i0k0Integrals related to modified Bessel functions of order 0
besselpolyWeighted integral of the Bessel function of the first kind

§Derivatives of Bessel functions

FunctionDescription
bessel_j_prime$n$-th derivative of bessel_j
bessel_y_prime$n$-th derivative of bessel_y
bessel_i_prime$n$-th derivative of bessel_i
bessel_k_prime$n$-th derivative of bessel_k
hankel_1_prime$n$-th derivative of hankel_1
hankel_2_prime$n$-th derivative of hankel_2

§Spherical Bessel functions

FunctionDescription
sph_bessel_jSpherical Bessel function of the first kind, $j_n(z)$
sph_bessel_j_primeDerivative of sph_bessel_j, $j_n'(z)$
sph_bessel_ySpherical Bessel function of the second kind, $y_n(z)$
sph_bessel_y_primeDerivative of sph_bessel_y, $y_n'(z)$
sph_bessel_iModified Spherical Bessel function of the first kind, $i_n(z)$
sph_bessel_i_primeDerivative of sph_bessel_i, $i_n'(z)$
sph_bessel_kModified Spherical Bessel function of the second kind, $k_n(z)$
sph_bessel_k_primeDerivative of sph_bessel_k, $k_n'(z)$

§Riccati-Bessel functions

FunctionDescription
riccati_jRiccati-Bessel function of the first kind and its derivative
riccati_yRiccati-Bessel function of the second kind and its derivative

§Struve functions

FunctionDescription
struve_hStruve function $H_{\nu}(x)$
struve_lModified Struve function $L_{\nu}(x)$
itstruve0Integral of the Struve function of order 0, $H_0(x)$
it2struve0Integral related to the Struve function of order 0
itmodstruve0Integral of the modified Struve function of order 0, $L_0(x)$

§Raw statistical functions

§Binomial distribution

FunctionDescription
bdtrCumulative distribution function
bdtrcComplement of bdtr
bdtriInverse of bdtr
bdtrikInverse of bdtr(k, n, p) with respect to k
bdtrinInverse of bdtr(k, n, p) with respect to n

§Beta distribution

FunctionDescription
btdtriaInverse of betainc(a, b, x) with respect to a
btdtribInverse of betainc(a, b, x) with respect to b

§F distribution

FunctionDescription
fdtrCumulative distribution function
fdtrcComplement of fdtr
fdtriInverse of fdtr
fdtridfdInverse of fdtr(a, b, x) with respect to b

§Noncentral F distribution

FunctionDescription
ncfdtrCumulative distribution function
ncfdtriInverse of the CDF with respect to f
ncfdtridfdInverse of the CDF with respect to dfd
ncfdtridfnInverse of the CDF with respect to dfn
ncfdtrincInverse of the CDF with respect to nc

§Gamma distribution

FunctionDescription
gdtrCumulative distribution function
gdtrcComplement of gdtr
gdtriaInverse of gdtr(a, b, x) with respect to a
gdtribInverse of gdtr(a, b, x) with respect to b
gdtrixInverse of gdtr(a, b, x) with respect to x

§Generalized hyperbolic distribution

FunctionDescription
genhyperbolic_pdfProbability density function
genhyperbolic_logpdfLogarithm of genhyperbolic_pdf

§Generalized inverse Gaussian distribution

FunctionDescription
geninvgauss_pdfProbability density function
geninvgauss_logpdfLogarithm of geninvgauss_pdf

§Negative binomial distribution

FunctionDescription
nbdtrCumulative distribution function
nbdtrcComplement of nbdtr
nbdtriInverse of nbdtr
nbdtrikInverse of nbdtr(k, n, p) with respect to k
nbdtrinInverse of nbdtr(k, n, p) with respect to n

§Noncentral t distribution

FunctionDescription
nctdtrCumulative distribution function
nctdtridfInverse of the CDF with respect to df
nctdtrincInverse of the CDF with respect to nc
nctdtritInverse of the CDF with respect to t

§Normal distribution

FunctionDescription
ndtrCumulative distribution function
ndtriInverse of ndtr
log_ndtrLogarithm of ndtr
ndtri_expInverse of log_ndtr
nrdtrimnMean, given p, std, and x
nrdtrisdStd, given mean, p, and x

§Poisson distribution

FunctionDescription
pdtrCumulative distribution function
pdtrcComplement of pdtr
pdtriInverse of pdtr
pdtrikInverse of pdtr(k, m) with respect to k

§Poisson binomial distribution

FunctionDescription
poisson_binom_cdfCumulative distribution function
poisson_binom_pmf_allFull probability mass function
poisson_binom_cdf_allFull cumulative distribution function

§Student’s t distribution

FunctionDescription
stdtrCumulative distribution function
stdtriInverse of stdtr
stdtridfInverse of stdtr(nu, x) with respect to nu

§Chi square distribution

FunctionDescription
chdtrCumulative distribution function
chdtrcComplement of chdtr
chdtriInverse of chdtrc
chdtrivInverse of chdtr(v, x) with respect to v

§Noncentral chi square distribution

FunctionDescription
chndtrCumulative distribution function
chndtriInverse of chndtr with respect to x
chndtridfInverse of chndtr with respect to df
chndtrincInverse of chndtr with respect to nc

§Kolmogorov distribution

FunctionDescription
kolmogorovSurvival function
kolmogpDerivative of kolmogorov
kolmogiInverse of kolmogorov
kolmogcComplement of kolmogorov
kolmogciInverse of kolmogc

§Kolmogorov-Smirnov distribution

FunctionDescription
smirnovSurvival function
smirnovpDerivative of smirnov
smirnoviInverse of smirnov
smirnovcComplement of smirnov
smirnovciInverse of smirnovc

§Box-Cox transformation

FunctionDescription
boxcoxBox-Cox transformation of $x$
boxcox1pBox-Cox transformation of $1 + x$
inv_boxcoxInverse of boxcox
inv_boxcox1pInverse of boxcox1p

§Sigmoidal functions

FunctionDescription
logitLogit function, $\ln ( \frac{x}{1-x} )$
expitExpit function, $\frac{1}{1 + \exp(-x)}$
log_expitLogarithm of expit

§Cramér-von Mises

FunctionDescription
cdf_cvm_infCDF of the Cramér-von Mises test statistic (infinite sample limit)
cdf_cvmCDF of the Cramér-von Mises test statistic for a finite sample size

§Wilcoxon signed-rank distribution

FunctionDescription
wilcoxon_pmf_allFull probability mass function
wilcoxon_cdf_allFull cumulative distribution function
wilcoxon_pmfProbability mass function, from wilcoxon_pmf_all
wilcoxon_cdfCumulative distribution function, from wilcoxon_cdf_all
wilcoxon_sfSurvival function, from wilcoxon_cdf_all

§Multivariate normal distribution

FunctionDescription
bivariate_normal_cdfCDF of the standard bivariate normal distribution
trivariate_normal_cdfCDF of the standard trivariate normal distribution

§Miscellaneous

FunctionDescription
tukeylambdacdfTukey-Lambda cumulative distribution function
von_mises_cdfVon Mises cumulative distribution function
cosine_cdfRaised cosine cumulative distribution function
cosine_invcdfInverse of cosine_cdf
owens_tOwen’s T function

§Information Theory functions

FunctionDescription
entrElementwise function for computing entropy, $H[X]$
rel_entrElementwise function for computing relative entropy, $H[X \rvert Y]$
kl_divElementwise function for computing Kullback-Leibler divergence
huberHuber loss function, $L_\delta(r)$
pseudo_huberPseudo-Huber loss function, $\widetilde{L}_\delta(r)$
FunctionDescription
gammaGamma function, $\Gamma(z)$
gammalnLog-gamma function, $\ln\abs{\Gamma(z)}$
loggammaPrincipal branch of $\ln \Gamma(z)$
gammasgnSign of gamma, $\sgn(\Gamma(z))$
gammaincRegularized lower incomplete gamma function $P(a,x) = 1 - Q(a,x)$
gammaincinvInverse of gammainc, $P^{-1}(a,y)$
gammainccRegularized upper incomplete gamma function $Q(a,x) = 1 - P(a,x)$
gammainccinvInverse of gammaincc, $Q^{-1}(a,y)$
log_gammaincLog of gammainc, $\ln P(a,x)$
log_gammainccLog of gammaincc, $\ln Q(a,x)$
betaBeta function, $\B(a,b) = {\Gamma(a)\Gamma(b) \over \Gamma(a+b)}$
betalnLog-Beta function, $\ln\abs{\B(a,b)}$
betaincRegularized incomplete beta function, $\I_x(a,b)$
betaincinvInverse of betainc, $\I_y^{-1}(a,b)$
betainccComplement of betainc, $1 - \I_x(a,b)$
betainccinvInverse of betaincc
digammaThe digamma function, $\psi(z)$
digammainvInverse of digamma, $\psi^{-1}(y)$
trigammaThe trigamma function, $\psi'(z)$
polygammaThe polygamma function, $\psi^{(n)}(x)$
multigammalnLog of multivariate gamma, sometimes called the generalized gamma
rgammaReciprocal of the gamma function, $\frac{1}{\Gamma(z)}$
pow_risingRising factorial $\rpow x m = {\Gamma(x+m) \over \Gamma(x)}$
pow_fallingFalling factorial $\fpow x m = {\Gamma(x+1) \over \Gamma(x+1-m)}$

§Error function and Fresnel integrals

FunctionDescription
erfError function, $\erf(z)$
erfcComplementary error function, $\erfc(z) = 1 - \erf(z)$
erfcxScaled complementary error function, $e^{z^2} \erfc(z)$
erfiImaginary error function $\erfi(z) = -i \erf(i z)$
erfinvInverse of erf, $\erf^{-1}(z)$
erfcinvInverse of erfc, $\erfc^{-1}(z) = \erf^{-1}(1 - z)$
erf_zerosZeros (roots) of erf
wofzFaddeeva function, $w(z) = e^{-z^2} \erfc(-iz)$
dawsnDawson function $D(z) = \frac{\sqrt{\pi}}{2} e^{-z^2} \erfi(z)$
fresnelFresnel integrals $S(z)$ and $C(z)$
fresnel_zerosZeros (roots) of Fresnel integrals $S(z)$ and $C(z)$
modified_fresnel_plusModified Fresnel positive integrals
modified_fresnel_minusModified Fresnel negative integrals
voigt_profileVoigt profile

§Legendre functions

FunctionDescription
legendre_pLegendre polynomial of the first kind, $P_n(z)$
legendre_p_allAll Legendre polynomials of the first kind
assoc_legendre_pAssociated Legendre polynomial of the 1st kind, $P_n^m(z)$
assoc_legendre_p_allAll associated Legendre polynomials of the 1st kind
assoc_legendre_p_normNormalized associated Legendre polynomial
assoc_legendre_p_norm_allAll normalized associated Legendre polynomials
sph_legendre_pSpherical Legendre polynomial of the first kind
sph_legendre_p_allAll spherical Legendre polynomials of the first kind
sph_harm_ySpherical harmonics, $Y_n^m(\theta,\phi)$
sph_harm_y_allAll spherical harmonics
legendre_q_allAll Legendre functions of the 2nd kind and derivatives
assoc_legendre_q_allAll associated Legendre functions of the 2nd kind and derivatives

§Orthogonal polynomials

The following functions evaluate values of orthogonal polynomials:

FunctionNameNotation
eval_jacobiJacobi$P_n^{(\alpha,\beta)}(z)$
eval_sh_jacobiShifted Jacobi$P_n^{*(\alpha,\beta)}(z)$
eval_gengegenbauerGeneralized Gegenbauer$G_n^{(p,q)}(z)$
eval_legendreLegendre$P_n(z)$
eval_sh_legendreShifted Legendre$P_n^*(z)$
eval_chebyshev_tChebyshev (first kind)$T_n(z)$
eval_chebyshev_uChebyshev (second kind)$U_n(z)$
eval_chebyshev_cChebyshev (first kind) on $[-2, 2]$$C_n(z)$
eval_chebyshev_sChebyshev (second kind) on $[-2, 2]$$S_n(z)$
eval_sh_chebyshev_tShifted Chebyshev (first kind)$T_n^*(z)$
eval_sh_chebyshev_uShifted Chebyshev (second kind)$U_n^*(z)$
eval_gegenbauerGegenbauer / Ultraspherical$C_n^{(\alpha)}(z)$
eval_genlaguerreGeneralized Laguerre$L_n^{(\alpha)}(z)$
eval_laguerreLaguerre$L_n(z)$
eval_hermite_hHermite (physicist’s)$H_n(x)$
eval_hermite_heHermite (probabilist’s)$He_n(x)$
eval_hahnHahn$Q_n(x;\alpha,\beta,N)$

Note that eval_sh_jacobi differs from scipy.special.eval_sh_jacobi, which is eval_gengegenbauer here (scipy/scipy#18988).

The following functions compute the nodes and weights of Gauss quadrature, i.e. the roots of these polynomials:

FunctionRoots of
roots_jacobi$P_n^{(\alpha,\beta)}$
roots_sh_jacobi$P_n^{*(\alpha,\beta)}$
roots_gengegenbauer$G_n^{(p,q)}$
roots_legendre$P_n$
roots_sh_legendre$P_n^*$
roots_chebyshev_t$T_n$
roots_chebyshev_u$U_n$
roots_chebyshev_c$C_n$
roots_chebyshev_s$S_n$
roots_sh_chebyshev_t$T_n^*$
roots_sh_chebyshev_u$U_n^*$
roots_gegenbauer$C_n^{(\alpha)}$
roots_genlaguerre$L_n^{(\alpha)}$
roots_laguerre$L_n$
roots_hermite_h$H_n$
roots_hermite_he$He_n$

§Hypergeometric functions

FunctionDescriptionNotation
hyp0f0Generalized hypergeometric function$_0F_0\left[ \middle| z\right]$
hyp1f0Generalized hypergeometric function$_1F_0\left[a\middle| z\right]$
hyp0f1Confluent hypergeometric limit function$_0F_1\left[b\middle| z\right]$
hyp1f1Confluent hypergeometric function$\hyp 1 1 a b z$
hyp1f2Generalized hypergeometric function$\hyp 1 2 a {b_1\enspace b_2} z$
hyp2f1Gauss’ hypergeometric function$\hyp 2 1 {a_1\enspace a_2} b z$
hyp2f2Generalized hypergeometric function$\hyp 2 2 {a_1\enspace a_2} {b_1\enspace b_2} z$
hyp3f2Generalized hypergeometric function$\hyp 3 2 {a_1\enspace a_2\enspace a_3} {b_1\enspace b_2} z$
hyppfqGeneralized hypergeometric function$\hyp p q {a_1\enspace \cdots} {b_1\enspace \cdots} z$
hypuConfluent hypergeometric function$U(a_1,a_2,x)$

§Parabolic cylinder functions

FunctionDescription
pbdn_seqpbdv for the integer orders $0, \ldots, n$ and complex $z$
pbdvParabolic cylinder function $D_v(x)$ and its derivative $D_v'(x)$
pbdv_seqpbdv for the orders $v - \lfloor v\rfloor, \ldots, v$
pbvvParabolic cylinder function $V_v(x)$ and its derivative $V_v'(x)$
pbvv_seqpbvv for the orders $v - \lfloor v\rfloor, \ldots, v$
pbwaParabolic cylinder function $W_a(x)$ and its derivative $W_a'(x)$
EvenOddDescription
mathieu_amathieu_bCharacteristic value of the Mathieu functions
mathieu_cemathieu_seMathieu functions
mathieu_cemmathieu_semMathieu functions, of an angle in degrees
mathieu_modcem1mathieu_modsem1Modified Mathieu functions of the first kind
mathieu_modcem2mathieu_modsem2Modified Mathieu functions of the second kind
mathieu_even_coefmathieu_odd_coefFourier coefficients for Mathieu functions

§Spheroidal wave functions

FunctionDescription
prolate_aswfa_nocvProlate spheroidal angular function of the first kind
prolate_radial1_nocvProlate spheroidal radial function of the first kind
prolate_radial2_nocvProlate spheroidal radial function of the second kind
oblate_aswfa_nocvOblate spheroidal angular function of the first kind
oblate_radial1_nocvOblate spheroidal radial function of the first kind
oblate_radial2_nocvOblate spheroidal radial function of the second kind
prolate_segvCharacteristic value of prolate spheroidal function
oblate_segvCharacteristic value of oblate spheroidal function
prolate_segv_seqCharacteristic values of prolate spheroidal functions
oblate_segv_seqCharacteristic values of oblate spheroidal functions

The following functions require pre-computed characteristic value:

FunctionDescription
prolate_aswfaProlate spheroidal angular function of the first kind
prolate_radial1Prolate spheroidal radial function of the first kind
prolate_radial2Prolate spheroidal radial function of the second kind
oblate_aswfaOblate spheroidal angular function of the first kind
oblate_radial1Oblate spheroidal radial function of the first kind
oblate_radial2Oblate spheroidal radial function of the second kind

§Kelvin functions

FunctionZerosDescription
kelvinkelvin_zerosKelvin functions as complex numbers
berber_zerosKelvin function $\ber(x)$
berpberp_zerosDerivative of ber, $\ber'(x)$
beibei_zerosKelvin function $\bei(x)$
beipbeip_zerosDerivative of bei, $\bei'(x)$
kerker_zerosKelvin function $\ker(x)$
kerpkerp_zerosDerivative of ker, $\ker'(x)$
keikei_zerosKelvin function $\kei(x)$
keipkeip_zerosDerivative of kei, $\kei'(x)$

§Combinatorics

FunctionDescription
comb$k$-combinations of $n$ things, $_nC_k = {n \choose k}$
comb_rep$k$-combinations with replacement, $\big(\!\!{n \choose k}\!\!\big)$
perm$k$-permutations of $n$ things, $_nP_k = {n! \over (n-k)!}$
stirling2Stirling number of the second kind $S(n,k)$

§Factorials

FunctionDescription
factorialFactorial $n!$
factorial_checkedfactorial with overflow checking
multifactorialMultifactorial $n!_{(k)}$
multifactorial_checkedmultifactorial with overflow checking

§Exponential integrals

FunctionDescription
expnGeneralized exponential integral $E_n(x)$
expiExponential integral $Ei(x)$
exp1Exponential integral $E_1(x)$
scaled_exp1Scaled exponential integral $x e^x E_1(x)$

§Zeta functions

FunctionDescription
zetaHurwitz zeta function $\zeta(z,q)$ for real or complex $z$
riemann_zetaRiemann zeta function $\zeta(z)$ for real or complex $z$
zetac$\zeta(x) - 1$ for real $x$

§Harmonic numbers

FunctionDescription
gen_harmonicGeneralized harmonic number $H_{n,a} = \sum_{i=1}^n i^{-a}$
normalized_gen_harmonicNormalized partial sum $\sum_{i=j}^k i^{-a} / H_{n,a}$
FunctionDescription
lambertwLambert W function
wrightomegaWright Omega function

§Other special functions

FunctionDescription
agmArithmetic-geometric mean of two scalars
bernoulliBernoulli numbers $B_0,\dotsc,B_{N-1}$
binomBinomial coefficient $\binom{n}{k}$ for real input
diricPeriodic sinc function, also called the Dirichlet kernel
eulerEuler numbers $E_0,\dotsc,E_{N-1}$
siciSine and cosine integrals $\Si(z)$ and $\Ci(z)$
shichiHyperbolic sine and cosine integrals $\Shi(z)$ and $\Chi(z)$
softmaxSoftmax function
log_softmaxLogarithm of the softmax function
spenceSpence’s function, also known as the dilogarithm
softplus$\ln(1 + e^x)$
log1mexp$\ln(1 - e^x)$

§Convenience functions

FunctionDescription
cbrt$\sqrt[3]{x}$
exp10$10^x$
exp2$2^x$
radianConvert from degrees to radians
cosdgCosine of an angle in degrees
sindgSine of an angle in degrees
tandgTangent of an angle in degrees
cotdgCotangent of an angle in degrees
cospi$\cos(\pi z)$
sinpi$\sin(\pi z)$
log1p$\ln(1+z)$
log1pmx$\ln(1+x) - x$
expm1$e^x - 1$
cosm1$\cos(x) - 1$
powm1$x^y - 1$
roundRound to nearest or even integer-valued float
xlogy$x \ln(y)$ or $0$ if $x = 0$
xlog1py$x \ln(1+y)$ or $0$ if $x = 0$
logaddexp$\ln(e^x + e^y)$
logaddexp2$\log_2(2^x + 2^y)$
logsumexp$\ln \sum e^{x_i}$
exprelRelative error exponential, $e^x - 1 \over x$
sincNormalized sinc function, $\sin(\pi x) \over \pi x$

Functions§

agm
Arithmetic-geometric mean
airy
Airy functions and derivatives
airy_ai_zeros
Zeros and values of the Airy function Ai and its derivative
airy_bi_zeros
Zeros and values of the Airy function Bi and its derivative
airy_integrals
Integrals of Airy functions
airy_scaled
Exponentially scaled Airy functions and derivatives
assoc_legendre_p
Associated Legendre polynomial of the 1st kind
assoc_legendre_p_all
All associated Legendre polynomials of the 1st kind
assoc_legendre_p_norm
Normalized associated Legendre polynomial of the 1st kind
assoc_legendre_p_norm_all
All normalized associated Legendre polynomials of the 1st kind
assoc_legendre_q_all
All associated Legendre functions of the 2nd kind and their derivatives
bdtr
Binomial distribution function
bdtrc
Binomial survival function
bdtri
Inverse of the binomial distribution function bdtr with respect to p
bdtrik
Inverse of bdtr with respect to k
bdtrin
Inverse of bdtr with respect to n
bei
Kelvin function $\bei$
bei_zeros
First nt zeros of Kelvin function bei
beip
Derivative of the Kelvin function bei
beip_zeros
First nt zeros of Kelvin function derivative beip
ber
Kelvin function $\ber$
ber_zeros
First nt zeros of Kelvin function ber
bernoulli
Bernoulli numbers $B_0, \ldots, B_{N-1}$
berp
Derivative of the Kelvin function ber
berp_zeros
First nt zeros of Kelvin function derivative berp
bessel_i
Modified Bessel function of the first kind, $I_v(z)$
bessel_i0
Modified Bessel function of the first kind of order 0, $I_0(x)$
bessel_i0e
Exponentially scaled modified Bessel function of the first kind of order 0, $e^{-|x|} I_0(x)$
bessel_i1
Modified Bessel function of the first kind of order 1, $I_1(x)$
bessel_i1e
Exponentially scaled modified Bessel function of the first kind of order 1, $e^{-|x|} I_1(x)$
bessel_i_prime
Compute the $n$th derivative of bessel_i(v, z) w.r.t. z
bessel_ie
Exponentially scaled modified Bessel function of the first kind, $e^{-\abs{\mathrm{Re}(z)}} I_v(z)$
bessel_j
Bessel function of the first kind, $J_v(z)$
bessel_j0
Bessel function of the first kind of order 0, $J_0(x)$
bessel_j1
Bessel function of the first kind of order 1, $J_1(x)$
bessel_j_jprime_zeros
Compute the first $N$ zeros of all $J_n(x)$ and $J_n'(x)$ with integer $n \ge 0$, in ascending order
bessel_j_prime
Compute the $n$th derivative of bessel_j(v, z) w.r.t. z
bessel_je
Exponentially scaled Bessel function of the first kind, $e^{-\abs{\mathrm{Im}(z)}} J_v(z)$
bessel_k
Modified Bessel function of the second kind, $K_v(z)$
bessel_k0
Modified Bessel function of the second kind of order 0, $K_0(x)$
bessel_k0e
Exponentially scaled modified Bessel function of the second kind of order 0, $e^x K_0(x)$
bessel_k1
Modified Bessel function of the second kind of order 1, $K_1(x)$
bessel_k1e
Exponentially scaled modified Bessel function of the second kind of order 1, $e^x K_1(x)$
bessel_k_prime
Compute the $n$th derivative of bessel_k(v, z) w.r.t. z
bessel_ke
Exponentially scaled modified Bessel function of the second kind, $e^z K_v(z)$
bessel_y
Bessel function of the second kind, $Y_v(z)$
bessel_y0
Bessel function of the second kind of order 0, $Y_0(x)$
bessel_y0_zeros
Compute $N$ zeros $z_k$ of the Bessel function $Y_0(z)$, and the values $Y_1(z_k)$
bessel_y1
Bessel function of the second kind of order 1, $Y_1(x)$
bessel_y1_prime_zeros
Compute $N$ zeros $z_k$ of the derivative $Y_1'(z)$, and the values $Y_1(z_k)$
bessel_y1_zeros
Compute $N$ zeros $z_k$ of the Bessel function $Y_1(z)$, and the values $Y_1'(z_k)$
bessel_y_prime
Compute the $n$th derivative of bessel_y(v, z) w.r.t. z
bessel_ye
Exponentially scaled Bessel function of the second kind, $e^{-\abs{\mathrm{Im}(z)}} Y_v(z)$
bessel_zeros
Compute $N$ zeros of Bessel functions $J_v(x)$, $J_v'(x)$, $Y_v(x)$, and $Y_v'(x)$
besselpoly
Weighted integral of the Bessel function of the first kind, $\int_0^1 x^\lambda \mathop{J}_v(2ax) \dd x$
beta
Beta function $\B(a,b)$
betainc
Regularized incomplete Beta function $\I_x(a,b)$
betaincc
Complement of the regularized incomplete Beta function, $1 - \I_x(a,b)$
betainccinv
Inverse of the complement of the regularized incomplete Beta function, $y = 1 - \I_x(a, b)$
betaincinv
Inverse of the regularized incomplete Beta function, $y = \I_x(a, b)$
betaln
Natural logarithm of the absolute value of beta, $\ln{\abs{\B(a,b)}}$
binom
Binomial coefficient considered as a function of two real variables
bivariate_normal_cdf
Cumulative distribution function of the standard bivariate normal distribution
boxcox
Box-Cox transformation
boxcox1p
Box-Cox transformation of 1 + x
btdtria
Inverse of betainc with respect to a
btdtrib
Inverse of betainc with respect to b
cbrt
Cube root of $x$, $\sqrt[3]{x}$
cdf_cvm
CDF of the Cramér-von Mises statistic for a finite sample size n
cdf_cvm_inf
CDF of the Cramér-von Mises test statistic (infinite sample limit)
cevalpoly
Evaluate polynomials
chdtr
CDF of the Chi-squared distribution
chdtrc
Survival function of the Chi-squared distribution
chdtri
Inverse of the Chi-squared survival function chdtrc with respect to x
chdtriv
Inverse of chdtr with respect to v
chndtr
CDF of the noncentral chi-square distribution
chndtri
Inverse of chndtr with respect to x
chndtridf
Inverse of chndtr with respect to df
chndtrinc
Inverse of chndtr with respect to nc
comb
$k$-combinations of $n$ things, $_nC_k$
comb_rep
$k$-combinations of $n$ things with replacement
cosdg
Cosine of angle in degrees
cosine_cdf
CDF of the standard (raised) cosine distribution, $\frac{\pi + x + \sin x}{2\pi}$
cosine_invcdf
Inverse of cosine_cdf, the quantile function of the standard (raised) cosine distribution
cosm1
$\cos(x) - 1$ for use when $x$ is near zero
cospi
$\cos(\pi z)$ for real or complex $z$
cotdg
Cotangent of the angle $x$ given in degrees
dawsn
Dawson function $\sqrt\pi e^{-z^2} \erfi(z) / 2$ for real or complex input
digamma
Digamma function $\psi(z)$ for real or complex input
digammainv
Inverse of the digamma function
diric
Dirichlet kernel, also known as the periodic sinc function.
ellip_harm
Ellipsoidal harmonic function $E^p_n(s)$
ellip_harm_2
Ellipsoidal harmonic function $F^p_n(s)$
ellip_normal
Ellipsoidal harmonic normalization constant $\gamma^p_n$
ellipe
Complete elliptic integral of the second kind $E(m)$
ellipeinc
Incomplete elliptic integral of the second kind $E(\phi \vert m)$
ellipj
Jacobi elliptic functions
ellipk
Complete elliptic integral of the first kind $K(m)$
ellipkinc
Incomplete elliptic integral of the first kind $F(\phi \vert m)$
ellipkm1
Complete elliptic integral of the first kind around $m = 1$
elliprc
Degenerate symmetric elliptic integral $R_C(x, y)$ for real or complex input
elliprd
Symmetric elliptic integral of the second kind $R_D(x, y, z)$ for real or complex input
elliprf
Completely-symmetric elliptic integral of the first kind $R_F(x, y, z)$ for real or complex input
elliprg
Completely-symmetric elliptic integral of the second kind $R_G(x, y, z)$ for real or complex input
elliprj
Symmetric elliptic integral of the third kind $R_J(x, y, z, p)$ for real or complex input
entr
Elementwise function for computing the entropy
erf
Error function $\erf(z)$ for real or complex input
erf_zeros
Zeros of the error function $\erf(z)$ in the first quadrant of the complex plane
erfc
Complementary error function $1 - \erf(z)$ for real or complex input
erfcinv
Inverse of the complementary error function $\erfc(x)$
erfcx
Scaled complementary error function $e^{z^2} \erfc(z)$ for real or complex input
erfi
Imaginary error function $-i \erf(i z)$ for real or complex input
erfinv
Inverse of the error function $\erf(x)$
euler
Euler numbers $E_0, \ldots, E_{N-1}$
eval_chebyshev_c
Evaluate Chebyshev polynomial of the first kind $C_n$ on $[-2, 2]$ at a point.
eval_chebyshev_s
Evaluate Chebyshev polynomial of the second kind $S_n$ on $[-2, 2]$ at a point.
eval_chebyshev_t
Evaluate Chebyshev polynomial of the first kind $T_n$ at a point.
eval_chebyshev_u
Evaluate Chebyshev polynomial of the second kind $U_n$ at a point.
eval_gegenbauer
Evaluate Gegenbauer polynomial $C_n^{(\alpha)}$ at a point.
eval_gengegenbauer
Evaluate generalized Gegenbauer polynomial $G_n^{(p,q)}$ at a point.
eval_genlaguerre
Evaluate generalized Laguerre polynomial $L_n^{(\alpha)}$ at a point.
eval_hahn
Evaluate the Hahn polynomial $Q_n(x; \alpha, \beta, N)$ at a point.
eval_hermite_h
Evaluate physicists’ Hermite polynomial $H_n(x)$ at a point
eval_hermite_he
Evaluate probabilists’ (normalized) Hermite polynomial $He_n(x)$ at a point
eval_jacobi
Evaluate Jacobi polynomial $P_n^{(\alpha, \beta)}$ at a point.
eval_laguerre
Evaluate Laguerre polynomial $L_n$ at a point
eval_legendre
Evaluate Legendre polynomial $P_n$ at a point.
eval_sh_chebyshev_t
Evaluate shifted Chebyshev polynomial of the first kind $T_n^*$ at a point.
eval_sh_chebyshev_u
Evaluate shifted Chebyshev polynomial of the second kind $U_n^*$ at a point.
eval_sh_jacobi
Evaluate shifted Jacobi polynomial $P_n^{*(\alpha,\beta)}$ at a point.
eval_sh_legendre
Evaluate shifted Legendre polynomial $P_n^*$ at a point.
exp1
Exponential integral $E_1$ for real or complex input
exp2
$2^x$
exp10
$10^x$
expi
Exponential integral $Ei$ for real or complex input
expit
Expit (a.k.a. logistic sigmoid) function, $1 / (1 + e^{-x})$
expm1
$e^x - 1$ for real or complex input
expn
Generalized exponential integral $E_n(x)$
exprel
Relative error exponential, $(e^x - 1) / x$
extended_absolute_error
Extended absolute error metric between two f64 or Complex<f64> values
extended_relative_error
Extended relative error metric between two f64 or Complex<f64> values
factorial
Factorial $n!$
factorial_checked
Factorial $n!$ with overflow checking
fdtr
CDF of the F distribution
fdtrc
Survival function of the F distribution
fdtri
Quantile function of the F distribution
fdtridfd
Inverse of fdtr with respect to b
fresnel
Fresnel integrals $S(z)$ and $C(z)$ for real or complex argument
fresnel_zeros
Zeros of Fresnel integrals $S(z)$ and $C(z)$
gamma
Gamma function $\Gamma(z)$ for real or complex argument.
gammainc
Regularized lower incomplete gamma function $P(a,x)$
gammaincc
Regularized upper incomplete gamma function $Q(a,x)$
gammainccinv
Inverse of gammaincc
gammaincinv
Inverse of gammainc
gammaln
Logarithm of the absolute value of gamma, $\ln{\abs{\Gamma(x)}}$
gammasgn
Sign of the Gamma function, $\sgn \Gamma(x)$
gdtr
CDF of the Gamma distribution
gdtrc
Survival function of the Gamma distribution
gdtria
Inverse of gdtr with respect to a
gdtrib
Inverse of gdtr with respect to b
gdtrix
Inverse of gdtr with respect to x
gen_harmonic
Generalized harmonic number $H_{n,a} = \sum_{i=1}^n i^{-a}$
genhyperbolic_logpdf
Logarithm of the generalized hyperbolic probability density function
genhyperbolic_pdf
Generalized hyperbolic probability density function
geninvgauss_logpdf
Logarithm of the generalized inverse Gaussian probability density function
geninvgauss_pdf
Generalized inverse Gaussian probability density function
hankel_1
Hankel function of the first kind, $H_v^{(1)}(z)$
hankel_2
Hankel function of the second kind, $H_v^{(2)}(z)$
hankel_1_prime
Compute the $n$th derivative of hankel_1(v, z) w.r.t. z
hankel_1e
Exponentially scaled Hankel function of the first kind, $e^{-iz} H_v^{(1)}(z)$
hankel_2_prime
Compute the $n$th derivative of hankel_2(v, z) w.r.t. z
hankel_2e
Exponentially scaled Hankel function of the second kind, $e^{iz} H_v^{(2)}(z)$
huber
Huber Loss function
hyp0f0
Hypergeometric function $_0F_0\left[\middle| z\right]$ for real or complex $z$
hyp0f1
Confluent hypergeometric limit function $_0F_1\left[b\middle| z\right]$ for real or complex $z$
hyp1f0
Hypergeometric function $_1F_0\left[a\middle| z\right]$ for real or complex $z$
hyp1f1
Kummer’s confluent hypergeometric function $_1F_1$
hyp1f2
Generalized hypergeometric function $_1F_2$ for real arguments
hyp2f1
Gauss’ hypergeometric function $_2F_1$
hyp2f2
Generalized hypergeometric function $_2F_2$ for real arguments
hyp3f2
Generalized hypergeometric function $_3F_2$ for real arguments
hyppfq
Generalized hypergeometric function $_pF_q$ for real arguments
hypu
Tricomi’s confluent hypergeometric function $U(a,b,x)$
inv_boxcox
Inverse of the Box-Cox transformation
inv_boxcox1p
Inverse of the Box-Cox transformation of 1 + x
it1i0k0
Integrals of modified Bessel functions of order 0
it1j0y0
Integrals of Bessel functions of order 0
it2i0k0
Integrals related to modified Bessel functions of order 0.
it2j0y0
Integrals related to Bessel functions of order 0
it2struve0
Integral related to the Struve $H_0$ function
itmodstruve0
Integral of the modified Struve $L_0$ function
itstruve0
Integral of the Struve $H_0$ function
iv_ratio
Compute $I_v(x) / I_{v-1}(x)$ of the modified Bessel function of the first kind
iv_ratio_c
Compute $1 - I_v(x) / I_{v-1}(x)$ of the modified Bessel function of the first kind
iv_ratioinv
Inverse of iv_ratio with respect to x
jahnke_emden_lambda
Evaluate the Jahnke-Emden Lambda function $\Lambda_v(x)$ and its derivatives
kei
Kelvin function $\kei$
kei_zeros
First nt zeros of Kelvin function kei
keip
Derivative of the Kelvin function kei
keip_zeros
First nt zeros of Kelvin function derivative keip
kelvin
Kelvin functions as complex numbers
kelvin_zeros
First nt zeros of all Kelvin functions and their derivatives
ker
Kelvin function $\ker$
ker_zeros
First nt zeros of Kelvin function ker
kerp
Derivative of the Kelvin function ker
kerp_zeros
First nt zeros of Kelvin function derivative kerp
kl_div
Elementwise function for computing the Kullback-Leibler divergence
kolmogc
CDF of the Kolmogorov distribution
kolmogci
Inverse of kolmogc, the quantile function of the Kolmogorov distribution
kolmogi
Inverse of kolmogorov
kolmogorov
Survival function of the Kolmogorov distribution
kolmogp
Derivative of kolmogorov
lambertw
Lambert W function.
legendre_p
Legendre polynomial of degree n
legendre_p_all
All Legendre polynomials of the 1st kind
legendre_q_all
All Legendre functions of the 2nd kind and their derivatives
log1mexp
Compute $\ln(1 - e^x)$
log1p
$ \log(1+z)$ for real or complex input
log1pmx
Compute $\log(1+x)-x$ for real input
log_expit
Natural logarithm of expit
log_gammainc
Log of the regularized lower incomplete gamma function, $\ln P(a,x)$
log_gammaincc
Log of the regularized upper incomplete gamma function, $\ln Q(a,x)$
log_ndtr
Logarithm of ndtr, $\ln \Phi(z)$
log_softmax
Compute the logarithm of the softmax function
log_wright_bessel
Natural logarithm of wright_bessel
logaddexp
$\ln(e^x + e^y)$
logaddexp2
$\log_2(2^x + 2^y)$
loggamma
Principal branch of the logarithm of $\Gamma(z)$
logit
Logit function, $\ln(x / (1 - x))$
logsumexp
Compute the log of the sum of exponentials of input elements
mathieu_a
Characteristic value of even Mathieu functions
mathieu_b
Characteristic value of odd Mathieu functions
mathieu_ce
Even Mathieu function and its derivative, of an angle in radians
mathieu_cem
Even Mathieu function and its derivative
mathieu_even_coef
Fourier coefficients for even Mathieu and modified Mathieu functions
mathieu_modcem1
Even modified Mathieu function of the first kind and its derivative
mathieu_modcem2
Even modified Mathieu function of the second kind and its derivative
mathieu_modsem1
Odd modified Mathieu function of the first kind and its derivative
mathieu_modsem2
Odd modified Mathieu function of the second kind and its derivative
mathieu_odd_coef
Fourier coefficients for odd Mathieu and modified Mathieu functions
mathieu_se
Odd Mathieu function and its derivative, of an angle in radians
mathieu_sem
Odd Mathieu function and its derivative
modified_fresnel_minus
Modified Fresnel negative integrals
modified_fresnel_plus
Modified Fresnel positive integrals
multifactorial
Multifactorial $n!_{(k)}$ for positive $k$
multifactorial_checked
Multifactorial $n!_{(k)}$ for positive $k$ with overflow checking
multigammaln
Log of multivariate gamma, $\ln \Gamma_d(a)$, sometimes called the generalized gamma
nbdtr
Negative binomial distribution function
nbdtrc
Negative binomial survival function
nbdtri
Inverse of the negative binomial distribution function nbdtr with respect to p
nbdtrik
Inverse of nbdtr with respect to k
nbdtrin
Inverse of nbdtr with respect to n
ncfdtr
CDF of the noncentral F distribution
ncfdtri
Inverse of ncfdtr with respect to f
ncfdtridfd
Inverse of the noncentral F CDF with respect to dfd
ncfdtridfn
Inverse of the noncentral F CDF with respect to dfn
ncfdtrinc
Inverse of the noncentral F CDF with respect to nc
nctdtr
CDF of the noncentral t distribution
nctdtridf
Inverse of the noncentral t CDF with respect to df
nctdtrinc
Inverse of the noncentral t CDF with respect to nc
nctdtrit
Inverse of the noncentral t CDF with respect to t
ndtr
CDF of the standard normal distribution, $\Phi(z)$
ndtri
Inverse of ndtr, the probit function $\Phi^{-1}(p)$
ndtri_exp
Inverse of log_ndtr vs x.
normalized_gen_harmonic
Normalized generalized harmonic number $\sum_{i=j}^k i^{-a} \big/ \sum_{i=1}^n i^{-a}$
nrdtrimn
Mean of the normal distribution, given the CDF value p, the standard deviation std, and the quantile x
nrdtrisd
Standard deviation of the normal distribution, given the mean mean, the CDF value p, and the quantile x
oblate_aswfa
Oblate spheroidal angular function for precomputed characteristic value
oblate_aswfa_nocv
Oblate spheroidal angular function of the 1st kind and its derivative
oblate_radial1
Oblate spheroidal radial function of the 1st kind for precomputed characteristic value
oblate_radial2
Oblate spheroidal radial function of the 2nd kind for precomputed characteristic value
oblate_radial1_nocv
Oblate spheroidal radial function of the 1st kind and its derivative
oblate_radial2_nocv
Oblate spheroidal radial function of the 2nd kind and its derivative
oblate_segv
Characteristic value of oblate spheroidal function
oblate_segv_seq
Characteristic values of the oblate spheroidal functions for modes m..=n
owens_t
Owen’s T function, $T(h, a)$
pbdn_seq
Parabolic cylinder functions $D_n(z)$ and their derivatives for the orders $0, \ldots, n$
pbdv
Parabolic cylinder function $D$
pbdv_seq
Parabolic cylinder functions $D_v(x)$ and their derivatives for a sequence of orders
pbvv
Parabolic cylinder function $V$
pbvv_seq
Parabolic cylinder functions $V_v(x)$ and their derivatives for a sequence of orders
pbwa
Parabolic cylinder function $W$
pdtr
Poisson distribution function
pdtrc
Poisson survival function
pdtri
Inverse of the Poisson distribution function pdtr with respect to m
pdtrik
Inverse of pdtr with respect to k
perm
$k$-permutations of $n$ things, $_nP_k$
pmv
Associated Legendre function for $|x| \leq 1$
poisson_binom_cdf
Poisson-Binomial cumulative distribution function
poisson_binom_cdf_all
Full CDF of a Poisson-Binomial distribution
poisson_binom_pmf_all
Full PMF of a Poisson-Binomial distribution
polygamma
Polygamma function $\psi^{(n)}(x)$
pow_falling
Falling factorial $\fpow x m$
pow_rising
Rising factorial $\rpow x m$
powm1
$x^y - 1$
prolate_aswfa
Prolate spheroidal angular function for precomputed characteristic value
prolate_aswfa_nocv
Prolate spheroidal angular function of the 1st kind and its derivative
prolate_radial1
Prolate spheroidal radial function of the 1st kind for precomputed characteristic value
prolate_radial2
Prolate spheroidal radial function of the 2nd kind for precomputed characteristic value
prolate_radial1_nocv
Prolate spheroidal radial function of the 1st kind and its derivative
prolate_radial2_nocv
Prolate spheroidal radial function of the 2nd kind and its derivative
prolate_segv
Characteristic value of prolate spheroidal function
prolate_segv_seq
Characteristic values of the prolate spheroidal functions for modes m..=n
pseudo_huber
Pseudo-Huber Loss function
radian
Convert from degrees to radians.
rel_entr
Elementwise function for computing relative entropy
rgamma
Reciprocal Gamma function $1 / \Gamma(z)$
riccati_j
Compute Riccati-Bessel function of the first kind and derivatives for the first $N$ orders
riccati_y
Compute Riccati-Bessel function of the second kind and derivatives for the first $N$ orders
riemann_zeta
Riemann zeta function $\zeta(z)$ for real or complex $z$
roots_chebyshev_c
Gauss-Chebyshev (first kind) quadrature on $[-2, 2]$
roots_chebyshev_s
Gauss-Chebyshev (second kind) quadrature on $[-2, 2]$
roots_chebyshev_t
Gauss-Chebyshev (first kind) quadrature
roots_chebyshev_u
Gauss-Chebyshev (second kind) quadrature
roots_gegenbauer
Gauss-Gegenbauer quadrature
roots_gengegenbauer
Gauss-Jacobi quadrature for the generalized Gegenbauer polynomials
roots_genlaguerre
Gauss-generalized Laguerre quadrature
roots_hermite_h
Gauss-Hermite (physicist’s) quadrature
roots_hermite_he
Gauss-Hermite (statistician’s) quadrature
roots_jacobi
Gauss-Jacobi quadrature
roots_laguerre
Gauss-Laguerre quadrature
roots_legendre
Gauss-Legendre quadrature
roots_sh_chebyshev_t
Gauss-Chebyshev (first kind, shifted) quadrature
roots_sh_chebyshev_u
Gauss-Chebyshev (second kind, shifted) quadrature
roots_sh_jacobi
Gauss-Jacobi (shifted) quadrature
roots_sh_legendre
Gauss-Legendre (shifted) quadrature
round
Round to nearest or even integer-valued float
scaled_exp1
Scaled version of the exponential integral $E_1$ for real input
shichi
Hyperbolic sine and cosine integrals.
sici
Sine and cosine integrals.
sinc
Normalized sinc function
sindg
Sine of the angle $x$ given in degrees.
sinpi
$\sin(\pi z)$ for real or complex $z$
smirnov
Survival function of the Kolmogorov-Smirnov distribution
smirnovc
CDF of the Kolmogorov-Smirnov distribution
smirnovci
Inverse of smirnovc
smirnovi
Inverse of smirnov
smirnovp
Derivative of smirnov
softmax
Compute the softmax function
softplus
$\ln(1 + e^x)$
spence
Spence’s function for real or complex argument, also known as the dilogarithm
sph_bessel_i
Modified spherical Bessel function of the first kind, $i_n(z)$
sph_bessel_i_prime
Derivative of sph_bessel_i, $i_n'(z)$
sph_bessel_j
Spherical Bessel function of the first kind, $j_n(z)$
sph_bessel_j_prime
Derivative of sph_bessel_j, $j_n'(z)$
sph_bessel_k
Modified spherical Bessel function of the second kind, $k_n(z)$
sph_bessel_k_prime
Derivative of sph_bessel_k, $k_n'(z)$
sph_bessel_y
Spherical Bessel function of the second kind, $y_n(z)$
sph_bessel_y_prime
Derivative of sph_bessel_y, $y_n'(z)$
sph_harm_y
Spherical harmonics
sph_harm_y_all
All spherical harmonics up to the specified degree $n$ and order $m$
sph_legendre_p
Spherical Legendre polynomial of degree n and order m
sph_legendre_p_all
All spherical Legendre polynomials of the 1st kind
stdtr
Student’s t distribution cumulative distribution function
stdtri
Inverse of stdtr
stdtridf
Inverse of stdtr with respect to nu
stirling2
Stirling number of the second kind $S(n,k)$
struve_h
Struve $H_v$ function
struve_l
Modified Struve $L_v$ function
tandg
Tangent of angle $x$ given in degrees
trigamma
Trigamma function $\psi'(z)$ for real or complex input
trivariate_normal_cdf
Cumulative distribution function of the standard trivariate normal distribution
tukeylambdacdf
CDF of the Tukey-Lambda distribution
voigt_profile
Voigt profile
von_mises_cdf
CDF of the von Mises distribution with concentration k, extended periodically over x
wilcoxon_cdf
CDF of the Wilcoxon signed-rank statistic, from a precomputed table
wilcoxon_cdf_all
Full CDF of the Wilcoxon signed-rank statistic
wilcoxon_pmf
PMF of the Wilcoxon signed-rank statistic, from a precomputed table
wilcoxon_pmf_all
Full PMF of the Wilcoxon signed-rank statistic
wilcoxon_sf
Survival function of the Wilcoxon signed-rank statistic, from a precomputed table
wofz
Faddeeva function $e^{-z^2} \erfc(-i z)$
wright_bessel
Wright’s generalized Bessel function $\Phi(a, b; x)$
wrightomega
Wright Omega function, $\omega(z)$
xlog1py
Compute $x \log(1+y)$ for real or complex input
xlogy
Compute $x \log(y)$ for real or complex input
zeta
Hurwitz zeta function $\zeta(z, q)$ for real or complex $z$
zetac
Riemann zeta function minus one, $\zeta(x) - 1$