> This provides a slightly more accurate bounding limit for > `computeNextExponentialSoftCapped` when calling it from > `computeNextGaussian`. This could cause the `while > (computeNextExponentialSoftCapped(rng, limit) < limit)` check in > `computeNextGaussian` on line 1402 to always be true, making the > `nextGaussian` runtime unbounded in the worst case; but more likely, it would > give a result that was truncated too close to zero. > > This change is being tested prior to submission to OpenJDK by > https://github.com/openjdk/jdk/pull/17703/commits/b8be051cbf40a6a05fafc6a2c76942e9e0b11fdf.
Chris Hennick has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains five commits: - Merge branch 'openjdk:master' into patch-2 - Bug fix: add-exports was for wrong package - Tweak boundary cases and add unit test - Bug fix: Math is in java.lang, not java.util - Fix a possible rounding error in RandomSupport::computeNextExponential This provides a slightly more accurate bounding limit for computeNextExponentialSoftCapped when the computed bound is greater than `(1.0p53 - 1.0) * DoubleZigguratTables.exponentialX0`. ------------- Changes: https://git.openjdk.org/jdk/pull/17703/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17703&range=03 Stats: 41 lines in 2 files changed: 36 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/17703.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/17703/head:pull/17703 PR: https://git.openjdk.org/jdk/pull/17703