# 3.5.2.5.29 Gamma

## Definition:

$gamma = gamma(x)$ evaluates

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

The function is based on a Chebyshev expansion for $\Gamma$(1+u), and uses the property $\Gamma$(1+x) = x$\Gamma$(x).

If x = N +1+u where N is integral and 0 ≤ u < 1 then it follows that:

for N >0 $\Gamma$(x) = (x - 1)(x - 2) . . . (x - N)$\Gamma$(1 + u)

for N = 0 $\Gamma$(x) = $\Gamma$(1+u)

for N <0 $\Gamma$(x) = $\Gamma$(1+u)/x(x + 1)(x + 2) . . . (x - N - 1).

$gamma$ (output, double)
the value of the function $\Gamma (x)=\int_0^\infty t^{x-1}e^{-t}dt$