public class Gamma
extends java.lang.Object
Constructor and Description |
---|
Gamma() |
Modifier and Type | Method and Description |
---|---|
static double |
digamma(double x)
digamma(x) = d log Gamma(x)/ dx
|
static double |
gamma(double x)
The Gamma function is defined by:
|
static double |
invDigamma(double y)
Newton iteration to solve digamma(x)-y = 0.
|
static double |
logGamma(double x)
log Gamma function: log(gamma(alpha)) for alpha bigger than 0, accurate to 10 decimal places
|
public static double logGamma(double x)
Reference: Pike MC & Hill ID (1966) Algorithm 291: Logarithm of the gamma function. Communications of the Association for Computing Machinery, 9:684
x
- parameter of the gamma functionpublic static double gamma(double x)
Gamma(x) = integral( t^(x-1) e^(-t), t = 0 .. infinity)
Uses Lanczos approximation formula.
x
- parameter of the gamma functionpublic static double digamma(double x)
x
- parameter of the gamma functionpublic static double invDigamma(double y)
y
- parameter y in the function aboveCopyright © 2017. All Rights Reserved.