Rounding differences between 1.8 and 1.7 (including -Xint mode).
Dawid Weiss
dawid.weiss at gmail.com
Mon Jul 30 04:52:00 PDT 2012
For what it's worth, the actual result of that is:
0.766121356090293351466794065...
so the output is rounded. I don't fully understand the comment on Math.pow:
> The computed result must be within 1 ulp of the exact result.
so it's hard for me to tell if it's a bug or compliant, but different,
implementation.
Dawid
On Mon, Jul 30, 2012 at 1:41 PM, Dawid Weiss <dawid.weiss at gmail.com> wrote:
> Hi Vladimir,
>
> This narrows down to Math.pow. I've tried with:
>
> Java(TM) SE Runtime Environment, 1.8.0-ea-b49
> Java HotSpot(TM) 64-Bit Server VM, 24.0-b16
>
> and the output is still different to what it should be (I think):
>
> Math.pow(0.35380219098726884, 0.2564102564102564) = 0.7661213560902934
>
> whereas it should be:
>
> 0.7661213560902933
>
> Simple test program attached.
>
> Dawid
>
> On Sat, Jul 21, 2012 at 12:16 AM, Vladimir Kozlov
> <vladimir.kozlov at oracle.com> wrote:
>> Dawid,
>>
>> It would be nice if you can provide a test case for us. What jdk8 build you
>> are using?
>>
>> We recently changed implementation of exp() and pow() in VM on x86 from C
>> code to use FPU instructions. It created a bugs tail. The latest bug 7177917
>> was fixed in jdk8b48.
>>
>> Thanks,
>> Vladimir
>>
>>
>> Dawid Weiss wrote:
>>>
>>> Hi everyone.
>>>
>>> We observe test regressions on fairly complex computational code
>>> resulting from small differences in double roundings. They show up
>>> when executed with latest 1.8 snapshot (compared to 1.7 and 1.6). Also
>>> applies when run in interpreted mode (-Xint).
>>>
>>> I was wondering if this is something to be expected? Thanks,
>>>
>>> Dawid
More information about the hotspot-compiler-dev
mailing list