Rounding differences between 1.8 and 1.7 (including -Xint mode).

Dawid Weiss dawid.weiss at
Mon Jul 30 04:41:13 PDT 2012

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:


Simple test program attached.


On Sat, Jul 21, 2012 at 12:16 AM, Vladimir Kozlov
<vladimir.kozlov at> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 587 bytes
Desc: not available
Url : 

More information about the hotspot-compiler-dev mailing list