Module rgsl::gamma_beta::gamma[][src]

Expand description

The Gamma function is defined by the following integral,

\Gamma(x) = \int_0^\infty dt t^{x-1} \exp(-t)

It is related to the factorial function by \Gamma(n)=(n-1)! for positive integer n. Further information on the Gamma function can be found in Abramowitz & Stegun, Chapter 6.

Functions

These routines compute the Gamma function \Gamma(x), subject to x not being a negative integer or zero. The function is computed using the real Lanczos method. The maximum value of x such that \Gamma(x) is not considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0.

This routine provides an exponential function \exp(x) using GSL semantics and error checking.

This routine computes the reciprocal of the gamma function, 1/\Gamma(x) using the real Lanczos method.

This routine computes the reciprocal of the gamma function, 1/\Gamma(x) using the real Lanczos method.

This routine computes the regulated Gamma Function \Gamma^*(x) for x > 0. The regulated gamma function is given by,

This routine computes the regulated Gamma Function \Gamma^*(x) for x > 0. The regulated gamma function is given by,

This routine computes the Gamma function \Gamma(x), subject to x not being a negative integer or zero. The function is computed using the real Lanczos method. The maximum value of x such that \Gamma(x) is not considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0.

This routine computes \log(\Gamma(z)) for complex z=z_r+i z_i and z not a negative integer or zero, using the complex Lanczos method. The returned parameters are lnr = \log|\Gamma(z)| and arg = \arg(\Gamma(z)) in (-\pi,\pi]. Note that the phase part (arg) is not well-determined when |z| is very large, due to inevitable roundoff in restricting to (-\pi,\pi]. This will result in a GSL_ELOSS error when it occurs. The absolute value part (lnr), however, never suffers from loss of precision.

This routine computes the Gamma function \Gamma(x), subject to x not being a negative integer or zero. The function is computed using the real Lanczos method. The maximum value of x such that \Gamma(x) is not considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0.

This routine computes the sign of the gamma function and the logarithm of its magnitude, subject to x not being a negative integer or zero. The function is computed using the real Lanczos method. The value of the gamma function and its error can be reconstructed using the relation \Gamma(x) = sgn * \exp(result_lg), taking into account the two components of result_lg.