Module gamma

Source
Expand description

Provides the gamma and related functions

Enums§

GammaFuncError
Represents the errors that can occur when computing any of the incomplete gamma functions.

Functions§

checked_gamma_li
Computes the lower incomplete gamma function gamma(a,x) = int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the upper integral limit.
checked_gamma_lr
Computes the lower incomplete regularized gamma function P(a,x) = 1 / Gamma(a) * int(exp(-t)t^(a-1), t=0..x) for real a > 0, x > 0 where a is the argument for the gamma function and x is the upper integral limit.
checked_gamma_ui
Computes the upper incomplete gamma function Gamma(a,x) = int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the lower intergral limit.
checked_gamma_ur
Computes the upper incomplete regularized gamma function Q(a,x) = 1 / Gamma(a) * int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the lower integral limit.
digamma
Computes the Digamma function which is defined as the derivative of the log of the gamma function. The implementation is based on “Algorithm AS 103”, Jose Bernardo, Applied Statistics, Volume 25, Number 3 1976, pages 315 - 317
gamma
Computes the gamma function with an accuracy of 16 floating point digits. The implementation is derived from “An Analysis of the Lanczos Gamma Approximation”, Glendon Ralph Pugh, 2004 p. 116
gamma_li
Computes the lower incomplete gamma function gamma(a,x) = int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the upper integral limit.
gamma_lr
Computes the lower incomplete regularized gamma function P(a,x) = 1 / Gamma(a) * int(exp(-t)t^(a-1), t=0..x) for real a > 0, x > 0 where a is the argument for the gamma function and x is the upper integral limit.
gamma_ui
Computes the upper incomplete gamma function Gamma(a,x) = int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the lower intergral limit.
gamma_ur
Computes the upper incomplete regularized gamma function Q(a,x) = 1 / Gamma(a) * int(exp(-t)t^(a-1), t=0..x) for a > 0, x > 0 where a is the argument for the gamma function and x is the lower integral limit.
inv_digamma
ln_gamma
Computes the logarithm of the gamma function with an accuracy of 16 floating point digits. The implementation is derived from “An Analysis of the Lanczos Gamma Approximation”, Glendon Ralph Pugh, 2004 p. 116