public final class LogGamma extends Object
\[ \operatorname{lgamma}(z) = \ln \lvert \Gamma(x) \rvert \]
This code has been adapted from the Boost
c++ implementation <boost/math/special_functions/gamma.hpp>.
| Modifier and Type | Method and Description |
|---|---|
static double |
value(double x)
Computes the function \( \ln \lvert \Gamma(x) \rvert \), the natural
logarithm of the absolute value of \( \Gamma(x) \).
|
static double |
value(double x,
int[] sign)
Computes the function \( \ln \lvert \Gamma(x) \rvert \), the natural
logarithm of the absolute value of \( \Gamma(x) \).
|
public static double value(double x)
x - Argument.NaN if x <= 0
and is an integer.public static double value(double x, int[] sign)
The sign output is set to 1 if the sign of gamma(x) is positive or zero; otherwise it is set to -1.
x - Argument.sign - Sign output. If a non-zero length the first index sign[0] is
set on output to the sign of gamma(z).NaN if x <= 0
and is an integer.Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.