On Tue, 24 May 2022 12:58:45 GMT, Raffaello Giulietti <d...@openjdk.java.net> 
wrote:

>> Extend the range of Random.doubles(double, double) and similar methods.
>
> Raffaello Giulietti has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8202449: overflow handling in Random.doubles

Hi,

the major code changes are in `RandomSupport` in methods

checkRange(float,float)
checkRange(double,double)

where the checks are more tolerant, and in

boundedNextDouble(RandomGenerator,double,double)
boundedNextFloat(RandomGenerator,float,float)


that extend the accepted range. In case the range size overflows, the methods 
half the range, generate a value inside the reduced range and finally double 
the outcome.

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

PR: https://git.openjdk.java.net/jdk/pull/8791

Reply via email to