You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2021/12/13 08:25:19 UTC
[commons-numbers] branch master updated: Lower threshold for a ~ z
This is an automated email from the ASF dual-hosted git repository.
aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
The following commit(s) were added to refs/heads/master by this push:
new 45e6f56 Lower threshold for a ~ z
45e6f56 is described below
commit 45e6f56f310bafe478ce77e7d84439e21015e84d
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Mon Dec 13 08:25:15 2021 +0000
Lower threshold for a ~ z
This threshold requires optimisation. The threshold was too high to pass
existing tests in Commons Statistics (see STATISTICS-39).
---
.../src/main/java/org/apache/commons/numbers/gamma/BoostGamma.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostGamma.java b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostGamma.java
index 0a5b9a1..ba11a7b 100644
--- a/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostGamma.java
+++ b/commons-numbers-gamma/src/main/java/org/apache/commons/numbers/gamma/BoostGamma.java
@@ -1824,8 +1824,7 @@ final class BoostGamma {
double prefix;
final double d = ((z - a) - Lanczos.gmh()) / agh;
-
- if ((Math.abs(d * d * a) <= 100) && (a > 150)) {
+ if ((Math.abs(d * d * a) <= 100) && (a > 100)) {
// special case for large a and a ~ z.
// When a and x are large, we end up with a very large exponent with a base near one:
// this will not be computed accurately via the pow function, and taking logs simply