Details
-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
19
Description
As per
https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/random/RandomGenerator.html#nextDouble(double,double)
"IllegalArgumentException - if origin is not finite, or bound is not finite, or origin is greater than or equal to bound, or the difference between bound and origin is so large that it cannot be represented as a finite double value"
For the input
rg.nextDouble(-Double.MAX_VALUE, Double.MAX_VALUE) It is expected to throw IAEx.
JDKb26 breaks this behavior.
https://download.java.net/java/early_access/jdk19/docs/api/java.base/java/util/random/RandomGenerator.html#nextDouble(double,double)
"IllegalArgumentException - if origin is not finite, or bound is not finite, or origin is greater than or equal to bound, or the difference between bound and origin is so large that it cannot be represented as a finite double value"
For the input
rg.nextDouble(-Double.MAX_VALUE, Double.MAX_VALUE) It is expected to throw IAEx.
JDKb26 breaks this behavior.
Attachments
Issue Links
- relates to
-
JDK-8202449 overflow handling in Random.doubles
- Resolved
-
JDK-8283084 RandomGenerator nextDouble(double, double) is documented incorrectly
- Resolved