-
Bug
-
Resolution: Fixed
-
P2
-
19
-
b26
-
b02
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8288277 | 19 | Joe Darcy | P2 | Resolved | Fixed | b27 |
Two tests from this test group api/java_util/Random/RandomGenerator/NextFloat.html are failing after JDK-8202449 fix.
The tests which are validating the spec : https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/random/RandomGenerator.html#nextFloat(float)
"Implementation Requirements:
The default implementation checks that bound is a positive finite float. Then invokes nextFloat(), scaling the result so that the final result lies between 0.0f (inclusive) and bound (exclusive)."
It looks the possible cause for these failures is - RandomSupport:boundedNextFloat =>
if (r >= bound) // may need to correct a rounding problem
r = Math.nextDown(r);
May be this is
if (r >= bound) // may need to correct a rounding problem
r = Math.nextDown(bound);
The tests which are validating the spec : https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/random/RandomGenerator.html#nextFloat(float)
"Implementation Requirements:
The default implementation checks that bound is a positive finite float. Then invokes nextFloat(), scaling the result so that the final result lies between 0.0f (inclusive) and bound (exclusive)."
It looks the possible cause for these failures is - RandomSupport:boundedNextFloat =>
if (r >= bound) // may need to correct a rounding problem
r = Math.nextDown(r);
May be this is
if (r >= bound) // may need to correct a rounding problem
r = Math.nextDown(bound);
- backported by
-
JDK-8288277 JDK-8202449 fix causes conformance test failure : api/java_util/Random/RandomGenerator/NextFloat.html
-
- Resolved
-
- relates to
-
JDK-8202449 overflow handling in Random.doubles
-
- Resolved
-
- links to
-
Commit openjdk/jdk19/f4b05a11
-
Commit openjdk/jdk/da2339cf
-
Review openjdk/jdk19/5
-
Review openjdk/jdk/9120
(1 links to)