SplittableRandom update

Paul Sandoz paul.sandoz at oracle.com
Thu Oct 3 10:32:33 UTC 2013


On Oct 1, 2013, at 6:03 PM, Joe Darcy <joe.darcy at oracle.com> wrote:

> On 10/1/2013 4:18 AM, Paul Sandoz wrote:
>> On Sep 20, 2013, at 5:30 PM, Martin Buchholz <martinrb at google.com> wrote:
>>> Looks good.
>>> 
>>> Random nitpicks:
>>> 
>>> I prefer the old variable name DOUBLE_UNIT to DOUBLE_ULP; else you are
>>> inventing a slightly different meaning for ULP.
>>> 
>>> I think using hex floating point literals is preferred:
>>> 
>>> -    private static final double DOUBLE_ULP = 1.0 / (1L << 53);
>>> +    private static final double DOUBLE_ULP = 0x1.0p-53;
>>> 
>> I don't have any strong preference on the above comments, Doug?
> 
> Please use the hex literals in a case like this; it is exactly the situation they were designed for.
> 

OK. 

Updated:

- to use hex floating point literals for all the random impls (i retained the other way in comments, since devs may not be familiar with this).

- reverted DOUBLE_ULP back to DOUBLE_UNIT.

http://cr.openjdk.java.net/~psandoz/tl/JDK-8025136-SR-enhancements/webrev/

Paul.



More information about the core-libs-dev mailing list