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/08/09 18:31:11 UTC
[commons-rng] branch master updated: Fix Gaussian performance test
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 414b6b7 Fix Gaussian performance test
414b6b7 is described below
commit 414b6b76885075d9d1918976cb40eb9f70f9614b
Author: Alex Herbert <ah...@apache.org>
AuthorDate: Mon Aug 9 19:31:06 2021 +0100
Fix Gaussian performance test
---
.../jmh/sampling/distribution/ZigguratSamplerPerformance.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/ZigguratSamplerPerformance.java b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/ZigguratSamplerPerformance.java
index 10f7a96..bca10c0 100644
--- a/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/ZigguratSamplerPerformance.java
+++ b/commons-rng-examples/examples-jmh/src/main/java/org/apache/commons/rng/examples/jmh/sampling/distribution/ZigguratSamplerPerformance.java
@@ -1250,8 +1250,8 @@ public class ZigguratSamplerPerformance {
// u1 = RANDOM_INT63();
long u1 = xx & MAX_INT64;
for (;;) {
- x = fastPrngSampleX(X, j, u1);
- if (fastPrngSampleY(Y, j, randomInt63()) < Math.exp(-0.5 * x * x)) {
+ x = fastPrngSampleX(j, u1);
+ if (fastPrngSampleY(j, randomInt63()) < Math.exp(-0.5 * x * x)) {
break;
}
u1 = randomInt63();