You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think @pshipton's comment in the Slack thread is key here, which I will quote:
Actually, it's Hotspot that has the "incorrect" answer, although this is allowed by the spec. Using StrictMath, the answer is 13.966610165238237 on both OpenJ9 and Hotspot.
"Unlike some of the numeric methods of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results. This relaxation permits better-performing implementations where strict reproducibility is not required."
This does not look like a bug, but rather a difference allowed by the Java spec.
Java -version output
Summary of problem
Math.pow(3, 2.4)
doesn't return the same result in Hotspot.In OpenJ9,
In Hotspot,
More discussion at https://openj9.slack.com/archives/C862YFGL9/p1602903053006700
The text was updated successfully, but these errors were encountered: