Gamma Functions

Contents

Gamma Functions#

The gamma function is a special function extending the factorial to real numbers.

gamma(x)#

Gamma function.

Parameters:

x (Real) – The value to take the gamma function of.

Definition:

\(\Gamma(x) = \displaystyle\int_0^\infty t^{x-1} e^{-t} \, dt\) for \(x > 0\), extended to the rest of the domain by analytic continuation.

Domain:

\(x \in \mathbb{R}\), excluding \(0, -1, -2, \ldots\)

Range:

\((-\infty, \infty)\), excluding \(0\)

Returns:

The value of \(\Gamma(x)\).

Return type:

Real

lgamma(x)#

Natural logarithm of the absolute value of the gamma function.

Parameters:

x (Real) – The value to take the function of.

Definition:

\(\mathrm{lgamma}(x) = \log{|\Gamma(x)|}\)

Domain:

\(x \in \mathbb{R}\), excluding \(0, -1, -2, \ldots\)

Range:

\((-\infty, \infty)\)

Returns:

The value of \(\log{|\Gamma(x)|}\).

Return type:

Real