RFR: 8326227: Rounding error that may distort computeNextGaussian results [v5]

Chris Hennick duke at openjdk.org
Fri Aug 9 19:12:49 UTC 2024


> 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 incrementally with one additional commit since the last revision:

  Update RandomSupportTest.java

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/17703/files
  - new: https://git.openjdk.org/jdk/pull/17703/files/4743d2bf..d391b96a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=17703&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=17703&range=03-04

  Stats: 4 lines in 1 file changed: 1 ins; 1 del; 2 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