Update ZigguaratSampler point of inflection for the Gaussian.
The point of inflection is the largest x value below 1. When x=1 the
second derivative of the Gaussian is zero (i.e. the point of
inflection).
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 a0812c8..8e2beca 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
@@ -805,7 +805,7 @@
/** Maximum i value for early exit. */
protected static final int I_MAX = 253;
/** The point where the Gaussian switches from convex to concave. */
- protected static final int J_INFLECTION = 205;
+ protected static final int J_INFLECTION = 204;
/** Used for largest deviations of f(x) from y_i. This is negated on purpose. */
protected static final long MAX_IE = -2269182951627976004L;
/** Used for largest deviations of f(x) from y_i. */
@@ -1556,7 +1556,7 @@
/** Maximum i value for early exit. */
protected static final int I_MAX = 509;
/** The point where the Gaussian switches from convex to concave. */
- protected static final int J_INFLECTION = 410;
+ protected static final int J_INFLECTION = 409;
/** Used for largest deviations of f(x) from y_i. This is negated on purpose. */
protected static final long MAX_IE = -2284356979160975476L;
/** Used for largest deviations of f(x) from y_i. */
diff --git a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ZigguratSampler.java b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ZigguratSampler.java
index 7885360..cf10fbc 100644
--- a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ZigguratSampler.java
+++ b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/ZigguratSampler.java
@@ -514,8 +514,9 @@
implements NormalizedGaussianSampler, SharedStateContinuousSampler {
/** Maximum i value for early exit. */
private static final int I_MAX = 253;
- /** The point where the Gaussian switches from convex to concave. */
- private static final int J_INFLECTION = 205;
+ /** The point where the Gaussian switches from convex to concave.
+ * This is the largest value of X[j] below 1. */
+ private static final int J_INFLECTION = 204;
/** Used for largest deviations of f(x) from y_i. This is negated on purpose. */
private static final long MAX_IE = -2269182951627976004L;
/** Used for largest deviations of f(x) from y_i. */