mirror of
https://github.com/apache/commons-math.git
synced 2025-03-06 08:29:06 +00:00
In Gamma.logGamma, replaced local variable g with class variable LANCZOS_G.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1376835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7b1b5e529c
commit
e9b6a4ffb3
@ -95,9 +95,8 @@ public class Gamma {
|
||||
if (Double.isNaN(x) || (x <= 0.0)) {
|
||||
ret = Double.NaN;
|
||||
} else {
|
||||
double g = 607.0 / 128.0;
|
||||
double sum = lanczos(x);
|
||||
double tmp = x + g + .5;
|
||||
double tmp = x + LANCZOS_G + .5;
|
||||
ret = ((x + .5) * FastMath.log(tmp)) - tmp +
|
||||
HALF_LOG_2_PI + FastMath.log(sum / x);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user