RFR: 8326227: Rounding error that may distort computeNextGaussian results [v12]
Chris Hennick
duke at openjdk.org
Sun Aug 11 02:12:20 UTC 2024
> This provides a slightly more accurate bounding limit for `computeNextExponentialSoftCapped`. Currently, if the maximum is specified as 12.0, it won't actually return a value larger than `1.5 * exponentialX0` (11.353912041222094); and the error gets worse as we go further into the tail. (This affects slightly less than 12 outputs per million for an ideal RNG.) 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 (with probability $$e^{-2^{63} exponentialX0} \approx 10^{-3.022 \times 10^{19}}$$ for an ideal RNG); 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 incrementally with five additional commits since the last revision:
- Merge remote-tracking branch 'origin/master' into patch-2
- Merge pull request #2 from Pr0methean/revert-1-whitesource/configure
Revert "Configure WhiteSource Bolt for GitHub"
- Revert "Configure WhiteSource Bolt for GitHub"
- Merge pull request #1 from Pr0methean/whitesource/configure
Configure WhiteSource Bolt for GitHub
- Add .whitesource configuration file
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17703/files
- new: https://git.openjdk.org/jdk/pull/17703/files/5e29b6f9..ddccfa6f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17703&range=11
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17703&range=10-11
Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 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
More information about the core-libs-dev
mailing list