Package org.apache.commons.numbers.gamma
Class LogGamma
java.lang.Object
org.apache.commons.numbers.gamma.LogGamma
public class LogGamma
extends java.lang.Object
Function \( \ln \Gamma(x) \).
Class is immutable.
-
Constructor Details
-
LogGamma
public LogGamma()
-
-
Method Details
-
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
NaNifx <= 0.
-