Package org.apache.commons.numbers.gamma
Class LogGamma
- java.lang.Object
-
- org.apache.commons.numbers.gamma.LogGamma
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
value(double x)
Computes the function \( \ln \Gamma(x) \) forx >= 0
.
-
-
-
Method Detail
-
value
public static double value(double x)
Computes the function \( \ln \Gamma(x) \) forx >= 0
. Forx <= 8
, the implementation is based on the double precision implementation in the NSWC Library of Mathematics Subroutines,DGAMLN
. Forx >= 8
, the implementation is based on- Gamma Function, equation (28).
- Lanczos Approximation, equations (1) through (5).
- Paul Godfrey, A note on the computation of the convergent Lanczos complex Gamma approximation
- Parameters:
x
- Argument.- Returns:
- \( \ln \Gamma(x) \), or
NaN
ifx <= 0
.
-
-