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-rng.git
The following commit(s) were added to refs/heads/master by this push:
new 7ceb042 Create the exponent to Math.pow explicitly as a double.
7ceb042 is described below
commit 7ceb042716f223c611443678fd99eb78f0fd15f3
Author: Alex Herbert <[email protected]>
AuthorDate: Wed Sep 11 21:06:36 2019 +0100
Create the exponent to Math.pow explicitly as a double.
---
.../rng/sampling/distribution/AhrensDieterExponentialSampler.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
index b6d23d3..b804210 100644
---
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
+++
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/AhrensDieterExponentialSampler.java
@@ -58,7 +58,7 @@ public class AhrensDieterExponentialSampler
double qi = 0;
for (int i = 0; i < EXPONENTIAL_SA_QI.length; i++) {
- qi += Math.pow(ln2, i + 1) / InternalUtils.factorial(i + 1);
+ qi += Math.pow(ln2, i + 1.0) / InternalUtils.factorial(i + 1);
EXPONENTIAL_SA_QI[i] = qi;
}
}