Rounding differences between 1.8 and 1.7 (including -Xint mode).
dawid.weiss at gmail.com
Mon Jul 30 22:58:19 PDT 2012
Thanks Roland, I need to catch up on floating point representations.
Even if it's not a bug it may be an unpleasant surprose for those
folks like us who have a lot of computational code. We had numeric
differences in the past resulting from JITted vs. interpreted
execution (and platform differences) so it's not a completely new
thing. While this isn't crucial in our application it does propagate
through computations and actually changes the final result (which is
an ordering so the order of items changes).
I understand this is an inherent feature of floating point
representation and I'm not complaining, but if it's something trivial
to modify (yeah, right...) then it'd be really nice to keep backwards
(exact) numeric compatibility.
> StrictMath.pow(0.35380219098726884, 0.2564102564102564) + Math.ulp(StrictMath.pow(0.35380219098726884, 0.2564102564102564)) == Math.pow(0.35380219098726884, 0.2564102564102564)
> which means, I think, that the result is within 1 ulp of the exact
> result. So that wouldn't be a bug.
More information about the hotspot-compiler-dev