This project serves solely to generate reference outputs from the original/scipy Cephes Math Library. Consequently, contributions addressing precision or error corrections may not be accepted. We recommend submitting such improvements to the scipy/xsf project instead.
NOTE: This project currently focuses on special functions.
Tip
For general applications, we recommend scipy/xsf.
It provides a modernized (C++17), header-only refactoring of classic special function implementations,
including AMOS, SPECFUN, and Cephes.
# Generate Coverage Report
cmake -S . -B build -DCMAKE_BUILD_TYPE=Coverage -DBUILD_TESTS=ON
cmake --build build --parallel 8 && ctest --test-dir build -j8 && cmake --build build --target coverage_html
ctest --test-dir build --rerun-failed --output-on-failure
# Release Build
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=./build/install_test
cmake --build build --parallel 8
cmake --install buildNOTE: Only functions list in public headers are treated as public API.
By default, Cephes does not signal any error (domain, singularity, overflow, underflow, precision). It is as non-intrusive as possible and tries to return a value which is hopefully usable: it might be NaN, it might be inf.
- ei, Exponential Integral
- expn, Exponential integral En
- sici, Sine and cosine integrals
- shichi, Hyperbolic sine and cosine integrals
- fac, Factorial function
- gamma, Gamma function
- lgam, Natural logarithm of gamma function
- igam, Incomplete gamma integral
- igamc, Complemented incomplete gamma integral
- igami, Inverse of complemented imcomplete gamma integral
- incbet, Incomplete beta integral
- incbi, Inverse of imcomplete beta integral
- psi, Psi (digamma) function
- rgamma, Reciprocal gamma function
- beta, Beta function
- erf, Error function
- erfc, Complementary error function
- dawsn, Dawson's Integral
- fresnl, Fresnel integral
- airy, Airy functions
- j0, Bessel function of order zero
- j1, Bessel function of order one
- jn, Bessel function of integer order
- jv, Bessel function of noninteger order
- i0, Modified Bessel function of order zero
- i0e, Exponentially scaled modified Bessel function of order zero
- i1, Modified Bessel function of order one
- i1e, Exponentially scaled modified Bessel function of order one
- iv, Modified Bessel function of noninteger order
- y0, Bessel function of the second kind, order zero
- y1, Bessel function of the second kind, order one
- yn, Bessel function of second kind of integer order
- yv, Bessel function of noninteger order
- k0, Modified Bessel function, third kind, order zero
- k0e, Modified Bessel function, third kind, order zero, exponentially scaled
- k1, Modified Bessel function, third kind, order one
- k1e, Modified Bessel function, third kind, order one, exponentially scaled
- kn, Modified Bessel function, third kind, integer order
- hyp2f1, Gauss hypergeometric function
- hyperg, Confluent hypergeometric function
- ellpk, Complete elliptic integral of the first kind
- ellik, Incomplete elliptic integral of the first kind
- ellpe, Complete elliptic integral of the second kind
- ellie, Incomplete elliptic integral of the second kind
- ellpj, Jacobian elliptic functions
- bdtr, Binomial distribution
- bdtrc, Complemented binomial distribution
- bdtri, Inverse binomial distribution
- btdtr, Beta distribution
- chdtr, Chi-square distribution
- chdtrc, Complemented Chi-square distribution
- chdtri, Inverse of complemented Chi-square distribution
- fdtr, F distribution
- fdtrc, Complemented F distribution
- fdtri, Inverse of complemented F distribution
- nbdtr, Negative binomial distribution
- nbdtrc, Complemented negative binomial distribution
- nbdtri, Functional inverse of negative binomial distribution
- pdtr, Poisson distribution function
- pdtrc, Complemented Poisson distribution function
- pdtri, Inverse of Poisson distribution function
- plancki, Integral of Planck's black body radiation formula
- polylog, Polylogarithms
- spence, Dilogarithm
- zeta, Zeta function of two arguments
- zetac, Riemann zeta function of two arguments
- struve, Struve function
This project is licensed under a BSD-3-Clause style license.
See LICENSE for details.
Cephes mathematical library, developed by Stephen L. Moshier.
For historical context, see the email communication with the original author: License request email.