Node:Special Functions, Next:Errors in Math Functions, Previous:Hyperbolic Functions, Up:Mathematics
These are some more exotic mathematical functions which are sometimes useful. Currently they only have real-valued versions.
| double erf (double x) | Function | 
| float erff (float x) | Function | 
| long double erfl (long double x) | Function | 
| erfreturns the error function of x.  The error
function is defined aserf (x) = 2/sqrt(pi) * integral from 0 to x of exp(-t^2) dt | 
| double erfc (double x) | Function | 
| float erfcf (float x) | Function | 
| long double erfcl (long double x) | Function | 
| erfcreturns1.0 - erf(x), but computed in a
fashion that avoids round-off error when x is large. | 
| double lgamma (double x) | Function | 
| float lgammaf (float x) | Function | 
| long double lgammal (long double x) | Function | 
| lgammareturns the natural logarithm of the absolute value of
the gamma function of x.  The gamma function is defined asgamma (x) = integral from 0 to ∞ of t^(x-1) e^-t dt The sign of the gamma function is stored in the global variable
signgam, which is declared in  To compute the real gamma function you can use the  lgam = lgamma(x); gam = signgam*exp(lgam); The gamma function has singularities at the non-positive integers. 
 | 
| double lgamma_r (double x, int *signp) | Function | 
| float lgammaf_r (float x, int *signp) | Function | 
| long double lgammal_r (long double x, int *signp) | Function | 
| lgamma_ris just likelgamma, but it stores the sign of
the intermediate result in the variable pointed to by signp
instead of in the signgam global.  This means it is reentrant. | 
| double gamma (double x) | Function | 
| float gammaf (float x) | Function | 
| long double gammal (long double x) | Function | 
| These functions exist for compatibility reasons.  They are equivalent to lgammaetc.  It is better to uselgammasince for one the
name reflects better the actual computation, moreoverlgammais
standardized in ISO C99 whilegammais not. | 
| double tgamma (double x) | Function | 
| float tgammaf (float x) | Function | 
| long double tgammal (long double x) | Function | 
| tgammaapplies the gamma function to x.  The gamma
function is defined asgamma (x) = integral from 0 to ∞ of t^(x-1) e^-t dt This function was introduced in ISO C99. | 
| double j0 (double x) | Function | 
| float j0f (float x) | Function | 
| long double j0l (long double x) | Function | 
| j0returns the Bessel function of the first kind of order 0 of
x.  It may signal underflow if x is too large. | 
| double j1 (double x) | Function | 
| float j1f (float x) | Function | 
| long double j1l (long double x) | Function | 
| j1returns the Bessel function of the first kind of order 1 of
x.  It may signal underflow if x is too large. | 
| double jn (int n, double x) | Function | 
| float jnf (int n, float x) | Function | 
| long double jnl (int n, long double x) | Function | 
| jnreturns the Bessel function of the first kind of order
n of x.  It may signal underflow if x is too large. | 
| double y0 (double x) | Function | 
| float y0f (float x) | Function | 
| long double y0l (long double x) | Function | 
| y0returns the Bessel function of the second kind of order 0 of
x.  It may signal underflow if x is too large.  If x
is negative,y0signals a domain error; if it is zero,y0signals overflow and returns -∞. | 
| double y1 (double x) | Function | 
| float y1f (float x) | Function | 
| long double y1l (long double x) | Function | 
| y1returns the Bessel function of the second kind of order 1 of
x.  It may signal underflow if x is too large.  If x
is negative,y1signals a domain error; if it is zero,y1signals overflow and returns -∞. | 
| double yn (int n, double x) | Function | 
| float ynf (int n, float x) | Function | 
| long double ynl (int n, long double x) | Function | 
| ynreturns the Bessel function of the second kind of order n of
x.  It may signal underflow if x is too large.  If x
is negative,ynsignals a domain error; if it is zero,ynsignals overflow and returns -∞. |