The cephes Reference Manual

This is the cephes Reference Manual, version 1.4.2, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:31:23 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cephes

Wrapper for the Cephes Mathematical Library

Author

Steven Nunez <>

License

MS-PL

Version

1.4.2

Dependency

cffi (system).

Source

cephes.asd.

Child Components

3 Modules

Modules are listed depth-first from the system components tree.


3.1 cephes/libmd

Source

cephes.asd.

Parent Component

cephes (system).

Child Component

makefile.m (file).


4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


4.1 Lisp


4.1.1 cephes/cephes.asd

Source

cephes.asd.

Parent Component

cephes (system).

ASDF Systems

cephes.


4.1.2 cephes/package.lisp

Dependency

libmd (module).

Source

cephes.asd.

Parent Component

cephes (system).

Packages

cephes.


4.1.3 cephes/init.lisp

Dependency

package.lisp (file).

Source

cephes.asd.

Parent Component

cephes (system).


4.1.4 cephes/cephes.lisp

Dependency

init.lisp (file).

Source

cephes.asd.

Parent Component

cephes (system).

Public Interface
Internals

4.2 Source


4.2.1 cephes/libmd/makefile.m

Source

cephes.asd.

Parent Component

libmd (module).


5 Packages

Packages are listed by definition order.


5.1 cephes

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


6.1 Public Interface


6.1.1 Ordinary functions

Function: airy (x)

Solution of the differential equation y”(x) = xy
The function returns the two independent solutions Ai, Bi and their first derivatives Ai’(x), Bi’(x), as VALUES (Ai Bi Aip Bip)

Package

cephes.

Source

cephes.lisp.

Function: bdtr (k n p)

Returns the sum of the terms 0 through k of the Binomial probability density

Package

cephes.

Source

cephes.lisp.

Function: bdtrc (k n p)

Returns the sum of the terms k+1 through n of the Binomial probability density

Package

cephes.

Source

cephes.lisp.

Function: bdtri (k n y)

Finds the event probability p such that the sum of the terms 0 through k of the Binomial probability density is equal to the given cumulative probability y.

Package

cephes.

Source

cephes.lisp.

Function: besselpoly (a lambda nu)
Package

cephes.

Source

cephes.lisp.

Function: beta (a b)
Package

cephes.

Source

cephes.lisp.

Function: btdtr (a b x)

Returns the area from zero to x under the beta density function.

x
- -
| (a+b) | | a-1 b-1
P(x) = ———- | t (1-t) dt
- - | |
| (a) | (b) -
0

This function is identical to the incomplete beta integral function incbet(a, b, x).

Package

cephes.

Source

cephes.lisp.

Function: cbrt (x)

Returns the cube root of the argument, which may be negative.

Package

cephes.

Source

cephes.lisp.

Function: chdtr (df x)

Returns the area under the left hand tail (from 0 to x) of the Chi square probability density function with DF degrees of freedom.

Package

cephes.

Source

cephes.lisp.

Function: chdtrc (df x)

Returns the area under the right hand tail (from x to infinity) of the Chi square probability density function with DF degrees of freedom

Package

cephes.

Source

cephes.lisp.

Function: chdtri (df y)

Finds the Chi-square argument x such that the integral from x to infinity of the Chi-square density is equal to the given cumulative probability y

Package

cephes.

Source

cephes.lisp.

Function: cosdg (d m s)

Range reduction is into intervals of 45 degrees.

Package

cephes.

Source

cephes.lisp.

Function: cosm1 (x)
Package

cephes.

Source

cephes.lisp.

Function: cospi (x)
Package

cephes.

Source

cephes.lisp.

Function: cotdg (x)

Returns the circular cotangent of the argument x in degrees

Package

cephes.

Source

cephes.lisp.

Function: dawsn (xx)
Package

cephes.

Source

cephes.lisp.

Function: ellie (phi m)
Package

cephes.

Source

cephes.lisp.

Function: ellik (phi m)
Package

cephes.

Source

cephes.lisp.

Function: ellpe (x)
Package

cephes.

Source

cephes.lisp.

Function: ellpk (x)
Package

cephes.

Source

cephes.lisp.

Function: erf (x)
Package

cephes.

Source

cephes.lisp.

Function: erfc (a)
Package

cephes.

Source

cephes.lisp.

Function: erfcinv (y)

Computes the inverse of the complimentary error function on the restricted domain 0 < y < 2. This restriction ensures the existence of a unique result such that erfc(erfcinv(y)) = y.

Package

cephes.

Source

cephes.lisp.

Function: erfinv (y)

Inverse of the error function.
Computes the inverse of the error function on the restricted domain -1 < y < 1. This restriction ensures the existence of a unique result such that erf(erfinv(y)) = y.

Package

cephes.

Source

cephes.lisp.

Function: exp10 (x)

Returns 10 raised to the x power.

Package

cephes.

Source

cephes.lisp.

Function: exp2 (x)

Returns 2 raised to the x power.

Package

cephes.

Source

cephes.lisp.

Function: expm1 (x)
Package

cephes.

Source

cephes.lisp.

Function: expn (n x)

Evaluates the exponential integral

Package

cephes.

Source

cephes.lisp.

Function: fdtr (a b x)

Returns the area from zero to x under the F density function

Package

cephes.

Source

cephes.lisp.

Function: fdtrc (a b x)

Returns the area from x to infinity under the F density function

Package

cephes.

Source

cephes.lisp.

Function: fdtri (a b y)

Finds the F density argument x such that the integral from -infinity to x of the F density is equal to the given probability p

Package

cephes.

Source

cephes.lisp.

Function: fresnl (xxa)
Package

cephes.

Source

cephes.lisp.

Function: gamma (x)

Returns Gamma function of the argument. The result is correctly signed.

Package

cephes.

Source

cephes.lisp.

Function: gdtr (a b x)

Returns the integral from zero to x of the Gamma probability density function

Package

cephes.

Source

cephes.lisp.

Function: gdtrc (a b x)

Returns the integral from x to infinity of the Gamma probability density function

Package

cephes.

Source

cephes.lisp.

Function: gdtri (a b y)
Package

cephes.

Source

cephes.lisp.

Function: hyp2f1 (a b c x)
Package

cephes.

Source

cephes.lisp.

Function: hyperg (a b x)

Computes the confluent hypergeometric function

Package

cephes.

Source

cephes.lisp.

Function: i0 (x)

Returns modified Bessel function of order zero of the argument

Package

cephes.

Source

cephes.lisp.

Function: i0e (x)

Returns exponentially scaled modified Bessel function of order zero of the argument

Package

cephes.

Source

cephes.lisp.

Function: i1 (x)

Returns modified Bessel function of order one of the argument

Package

cephes.

Source

cephes.lisp.

Function: i1e (x)

Returns exponentially scaled modified Bessel function of order one of the argument

Package

cephes.

Source

cephes.lisp.

Function: igam (a x)
Package

cephes.

Source

cephes.lisp.

Function: igamc (a x)
Package

cephes.

Source

cephes.lisp.

Function: igamci (a q)
Package

cephes.

Source

cephes.lisp.

Function: igami (a p)

Returns the x such that: igamc(a, x) = p
The input argument a must be positive and p must be between 0 and 1.

Package

cephes.

Source

cephes.lisp.

Function: incbet (aa bb xx)

Returns incomplete beta integral of the arguments, evaluated from zero to x.

Package

cephes.

Source

cephes.lisp.

Function: incbi (aa bb yy0)

Given y, the function finds x such that incbet( a, b, x ) = y

Package

cephes.

Source

cephes.lisp.

Function: iv (v x)

Returns modified Bessel function of order v of the argument. If x is negative, v must be integer valued.

Package

cephes.

Source

cephes.lisp.

Function: j0 (x)

Returns Bessel function of order zero of the argument

Package

cephes.

Source

cephes.lisp.

Function: j1 (x)

Returns Bessel function of order one of the argument.

Package

cephes.

Source

cephes.lisp.

Function: jacobian-elliptic (u m)

Evaluates the Jacobian elliptic functions sn(u|m), cn(u|m), and dn(u|m) of parameter m between 0 and 1, and real argument u. Returns VALUES (sn cn dn)

Package

cephes.

Source

cephes.lisp.

Function: jv (v x)

Returns Bessel function of order v of the argument, where v is real. Negative x is allowed if v is an integer.

Package

cephes.

Source

cephes.lisp.

Function: k0 (x)

Returns modified Bessel function of the third kind of order zero of the argument.

Package

cephes.

Source

cephes.lisp.

Function: k0e (x)

Returns exponentially scaled modified Bessel function of the third kind of order zero of the argument.

Package

cephes.

Source

cephes.lisp.

Function: k1 (x)

Computes the modified Bessel function of the third kind of order one of the argument.

Package

cephes.

Source

cephes.lisp.

Function: k1e (x)

Returns exponentially scaled modified Bessel function of the third kind of order one of the argument

Package

cephes.

Source

cephes.lisp.

Function: kn (nn x)

Returns modified Bessel function of the third kind of order n of the argument

Package

cephes.

Source

cephes.lisp.

Function: lanczos-sum (x)
Package

cephes.

Source

cephes.lisp.

Function: lanczos-sum-near-1 (x)
Package

cephes.

Source

cephes.lisp.

Function: lanczos-sum-near-2 (x)
Package

cephes.

Source

cephes.lisp.

Function: lanczos-sum-scaled (x)
Package

cephes.

Source

cephes.lisp.

Function: lbeta (a b)
Package

cephes.

Source

cephes.lisp.

Function: lgam1p (x)
Package

cephes.

Source

cephes.lisp.

Function: log-gamma (x)

Returns the base e logarithm of the absolute value of the Gamma function of the argument.

Package

cephes.

Source

cephes.lisp.

Function: log-ndtr (a)
Package

cephes.

Source

cephes.lisp.

Function: log1p (x)
Package

cephes.

Source

cephes.lisp.

Function: log1pmx (x)
Package

cephes.

Source

cephes.lisp.

Function: nbdtr (k n p)

Returns the sum of the terms 0 through k of the negative binomial distribution

Package

cephes.

Source

cephes.lisp.

Function: nbdtrc (k n p)

Returns the sum of the terms k+1 to infinity of the negative binomial distribution

Package

cephes.

Source

cephes.lisp.

Function: nbdtri (k n p)

Returns the sum of the terms k+1 to infinity of the negative binomial distribution

Package

cephes.

Source

cephes.lisp.

Function: ndtr (a)

Returns the area under the Gaussian probability density function, integrated from minus infinity to x

Package

cephes.

Source

cephes.lisp.

Function: ndtri (y0)

Returns the argument, x, for which the area under the Gaussian probability density function (integrated from minus infinity to x) is equal to y.
For small arguments 0 < y < exp(-2), the program computes z = sqrt( -2.0 * log(y) ); then the approximation is x = z - log(z)/z - (1/z) P(1/z) / Q(1/z).

Package

cephes.

Source

cephes.lisp.

Function: owens-t (h a)
Package

cephes.

Source

cephes.lisp.

Function: pdtr (k m)

Returns the sum of the first k terms of the Poisson distribution

Package

cephes.

Source

cephes.lisp.

Function: pdtrc (k m)

Returns the sum of the terms k+1 to infinity of the Poisson distribution

Package

cephes.

Source

cephes.lisp.

Function: pdtri (k y)

Finds the Poisson variable x such that the integral from 0 to x of the Poisson density is equal to the given probability y

Package

cephes.

Source

cephes.lisp.

Function: poch (x m)
Package

cephes.

Source

cephes.lisp.

Function: psi (x)

Returns the logarithmic derivative of the gamma function

Package

cephes.

Source

cephes.lisp.

Function: rgamma (x)

Returns one divided by the Gamma function of the argument

Package

cephes.

Source

cephes.lisp.

Function: shichi (x)

Returns VALUES (si ci)

Package

cephes.

Source

cephes.lisp.

Function: sici (x)

Returns VALUES (si ci)

Package

cephes.

Source

cephes.lisp.

Function: sindg (d m s)

Range reduction is into intervals of 45 degrees.

Package

cephes.

Source

cephes.lisp.

Function: sinpi (x)
Package

cephes.

Source

cephes.lisp.

Function: spence (x)
Package

cephes.

Source

cephes.lisp.

Function: stdtr (k t1)

Computes the integral from minus infinity to t of the Student t distribution with integer k > 0 degrees of freedom

Package

cephes.

Source

cephes.lisp.

Function: stdtri (k p)

Given probability p, finds the argument t such that stdtr(k,t) is equal to p

Package

cephes.

Source

cephes.lisp.

Function: tandg (x)

Returns the circular tangent of the argument x in degrees

Package

cephes.

Source

cephes.lisp.

Function: y0 (x)

Bessel function of the second kind, order zero

Package

cephes.

Source

cephes.lisp.

Function: y1 (x)

Returns Bessel function of the second kind of order one of the argument.

Package

cephes.

Source

cephes.lisp.

Function: yn (n x)

Returns Bessel function of order n, where n is a (possibly negative) integer

Package

cephes.

Source

cephes.lisp.

Function: yv (v x)
Package

cephes.

Source

cephes.lisp.

Function: zeta (x q)
Package

cephes.

Source

cephes.lisp.

Function: zetac (x)
Package

cephes.

Source

cephes.lisp.


6.2 Internals


6.2.1 Ordinary functions

Function: cephes-airy (x ai aip bi bip)

Solution of the differential equation y”(x) = xy
The function returns the two independent solutions Ai, Bi and their first derivatives Ai’(x), Bi’(x).

Package

cephes.

Source

cephes.lisp.

Function: cephes-ellpj (u m sn cn dn phi)
Package

cephes.

Source

cephes.lisp.

Function: cephes-fresnl (xxa ssa cca)

Evaluates S and C fresnel integrals and returns VALUES (S C)

Package

cephes.

Source

cephes.lisp.

Function: cephes-shichi (x si ci)
Package

cephes.

Source

cephes.lisp.

Function: cephes-sici (x si ci)
Package

cephes.

Source

cephes.lisp.

Function: evlrat (x num m denom n)

Evaluate a rational function

Package

cephes.

Source

cephes.lisp.

Function: sign-gamma (x)
Package

cephes.

Source

cephes.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   B   C   D   E   F   G   H   I   J   K   L   N   O   P   R   S   T   Y   Z  
Index Entry  Section

A
airy: Public ordinary functions

B
bdtr: Public ordinary functions
bdtrc: Public ordinary functions
bdtri: Public ordinary functions
besselpoly: Public ordinary functions
beta: Public ordinary functions
btdtr: Public ordinary functions

C
cbrt: Public ordinary functions
cephes-airy: Private ordinary functions
cephes-ellpj: Private ordinary functions
cephes-fresnl: Private ordinary functions
cephes-shichi: Private ordinary functions
cephes-sici: Private ordinary functions
chdtr: Public ordinary functions
chdtrc: Public ordinary functions
chdtri: Public ordinary functions
cosdg: Public ordinary functions
cosm1: Public ordinary functions
cospi: Public ordinary functions
cotdg: Public ordinary functions

D
dawsn: Public ordinary functions

E
ellie: Public ordinary functions
ellik: Public ordinary functions
ellpe: Public ordinary functions
ellpk: Public ordinary functions
erf: Public ordinary functions
erfc: Public ordinary functions
erfcinv: Public ordinary functions
erfinv: Public ordinary functions
evlrat: Private ordinary functions
exp10: Public ordinary functions
exp2: Public ordinary functions
expm1: Public ordinary functions
expn: Public ordinary functions

F
fdtr: Public ordinary functions
fdtrc: Public ordinary functions
fdtri: Public ordinary functions
fresnl: Public ordinary functions
Function, airy: Public ordinary functions
Function, bdtr: Public ordinary functions
Function, bdtrc: Public ordinary functions
Function, bdtri: Public ordinary functions
Function, besselpoly: Public ordinary functions
Function, beta: Public ordinary functions
Function, btdtr: Public ordinary functions
Function, cbrt: Public ordinary functions
Function, cephes-airy: Private ordinary functions
Function, cephes-ellpj: Private ordinary functions
Function, cephes-fresnl: Private ordinary functions
Function, cephes-shichi: Private ordinary functions
Function, cephes-sici: Private ordinary functions
Function, chdtr: Public ordinary functions
Function, chdtrc: Public ordinary functions
Function, chdtri: Public ordinary functions
Function, cosdg: Public ordinary functions
Function, cosm1: Public ordinary functions
Function, cospi: Public ordinary functions
Function, cotdg: Public ordinary functions
Function, dawsn: Public ordinary functions
Function, ellie: Public ordinary functions
Function, ellik: Public ordinary functions
Function, ellpe: Public ordinary functions
Function, ellpk: Public ordinary functions
Function, erf: Public ordinary functions
Function, erfc: Public ordinary functions
Function, erfcinv: Public ordinary functions
Function, erfinv: Public ordinary functions
Function, evlrat: Private ordinary functions
Function, exp10: Public ordinary functions
Function, exp2: Public ordinary functions
Function, expm1: Public ordinary functions
Function, expn: Public ordinary functions
Function, fdtr: Public ordinary functions
Function, fdtrc: Public ordinary functions
Function, fdtri: Public ordinary functions
Function, fresnl: Public ordinary functions
Function, gamma: Public ordinary functions
Function, gdtr: Public ordinary functions
Function, gdtrc: Public ordinary functions
Function, gdtri: Public ordinary functions
Function, hyp2f1: Public ordinary functions
Function, hyperg: Public ordinary functions
Function, i0: Public ordinary functions
Function, i0e: Public ordinary functions
Function, i1: Public ordinary functions
Function, i1e: Public ordinary functions
Function, igam: Public ordinary functions
Function, igamc: Public ordinary functions
Function, igamci: Public ordinary functions
Function, igami: Public ordinary functions
Function, incbet: Public ordinary functions
Function, incbi: Public ordinary functions
Function, iv: Public ordinary functions
Function, j0: Public ordinary functions
Function, j1: Public ordinary functions
Function, jacobian-elliptic: Public ordinary functions
Function, jv: Public ordinary functions
Function, k0: Public ordinary functions
Function, k0e: Public ordinary functions
Function, k1: Public ordinary functions
Function, k1e: Public ordinary functions
Function, kn: Public ordinary functions
Function, lanczos-sum: Public ordinary functions
Function, lanczos-sum-near-1: Public ordinary functions
Function, lanczos-sum-near-2: Public ordinary functions
Function, lanczos-sum-scaled: Public ordinary functions
Function, lbeta: Public ordinary functions
Function, lgam1p: Public ordinary functions
Function, log-gamma: Public ordinary functions
Function, log-ndtr: Public ordinary functions
Function, log1p: Public ordinary functions
Function, log1pmx: Public ordinary functions
Function, nbdtr: Public ordinary functions
Function, nbdtrc: Public ordinary functions
Function, nbdtri: Public ordinary functions
Function, ndtr: Public ordinary functions
Function, ndtri: Public ordinary functions
Function, owens-t: Public ordinary functions
Function, pdtr: Public ordinary functions
Function, pdtrc: Public ordinary functions
Function, pdtri: Public ordinary functions
Function, poch: Public ordinary functions
Function, psi: Public ordinary functions
Function, rgamma: Public ordinary functions
Function, shichi: Public ordinary functions
Function, sici: Public ordinary functions
Function, sign-gamma: Private ordinary functions
Function, sindg: Public ordinary functions
Function, sinpi: Public ordinary functions
Function, spence: Public ordinary functions
Function, stdtr: Public ordinary functions
Function, stdtri: Public ordinary functions
Function, tandg: Public ordinary functions
Function, y0: Public ordinary functions
Function, y1: Public ordinary functions
Function, yn: Public ordinary functions
Function, yv: Public ordinary functions
Function, zeta: Public ordinary functions
Function, zetac: Public ordinary functions

G
gamma: Public ordinary functions
gdtr: Public ordinary functions
gdtrc: Public ordinary functions
gdtri: Public ordinary functions

H
hyp2f1: Public ordinary functions
hyperg: Public ordinary functions

I
i0: Public ordinary functions
i0e: Public ordinary functions
i1: Public ordinary functions
i1e: Public ordinary functions
igam: Public ordinary functions
igamc: Public ordinary functions
igamci: Public ordinary functions
igami: Public ordinary functions
incbet: Public ordinary functions
incbi: Public ordinary functions
iv: Public ordinary functions

J
j0: Public ordinary functions
j1: Public ordinary functions
jacobian-elliptic: Public ordinary functions
jv: Public ordinary functions

K
k0: Public ordinary functions
k0e: Public ordinary functions
k1: Public ordinary functions
k1e: Public ordinary functions
kn: Public ordinary functions

L
lanczos-sum: Public ordinary functions
lanczos-sum-near-1: Public ordinary functions
lanczos-sum-near-2: Public ordinary functions
lanczos-sum-scaled: Public ordinary functions
lbeta: Public ordinary functions
lgam1p: Public ordinary functions
log-gamma: Public ordinary functions
log-ndtr: Public ordinary functions
log1p: Public ordinary functions
log1pmx: Public ordinary functions

N
nbdtr: Public ordinary functions
nbdtrc: Public ordinary functions
nbdtri: Public ordinary functions
ndtr: Public ordinary functions
ndtri: Public ordinary functions

O
owens-t: Public ordinary functions

P
pdtr: Public ordinary functions
pdtrc: Public ordinary functions
pdtri: Public ordinary functions
poch: Public ordinary functions
psi: Public ordinary functions

R
rgamma: Public ordinary functions

S
shichi: Public ordinary functions
sici: Public ordinary functions
sign-gamma: Private ordinary functions
sindg: Public ordinary functions
sinpi: Public ordinary functions
spence: Public ordinary functions
stdtr: Public ordinary functions
stdtri: Public ordinary functions

T
tandg: Public ordinary functions

Y
y0: Public ordinary functions
y1: Public ordinary functions
yn: Public ordinary functions
yv: Public ordinary functions

Z
zeta: Public ordinary functions
zetac: Public ordinary functions


A.3 Variables