[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: [OpenJDK 2D-Dev] JDK 9 RFR of JDK-8149896: Remove unnecessary values in FloatConsts and DoubleCo
From: Jim Graham <james.graham () oracle ! com>
Date: 2016-02-16 22:28:27
Message-ID: 56C3A28B.7070100 () oracle ! com
[Download RAW message or body]
Laurent may not technically be a reviewer, but he pretty much owns that
code so if he's happy then I'm happy (but I didn't look at any of the
other code outside of Marlin if you are keeping count of "full
reviewers"...).
...jim
On 2/16/2016 2:08 AM, Laurent Bourgès wrote:
> Hello,
>
> Joe, I tested your changes in the Marlin renderer as it works well !
>
>
> > A quick note on the 2d changes, several constants (and a copy from a \
> > package-private method from java.lang) were used to initialize a double value \
> > POWER_2_TO_32; this can be accomplished more directly using a hexadecimal \
> > floating-point literal.
> > Please review the webrev
> >
> > http://cr.openjdk.java.net/~darcy/8149896.0/
> ...
> My favourite change is this one:
>
> - private static final double POWER_2_TO_32 =
> FloatMath.powerOfTwoD(32);
> + private static final double POWER_2_TO_32 = 0x1.0p32;
>
> and the removal of the method on FloatMath.
>
>
> I agree it is simpler and exactly what I needed; I wasn't aware of such
> literals:
> https://blogs.oracle.com/darcy/entry/hexadecimal_floating_point_literals
>
> (I am not a reviewer)
>
> Thanks for the fix,
> Laurent
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic