RFR(S): 8063086: Math.pow yields different results upon repeated calls
marc.b.reynolds at gmail.com
Fri Jan 9 08:27:43 UTC 2015
Why is this considered a bug? Doing so seems to be opening a can of worms. As an example any expression which lowers to contain FMA like instructions will yield different results once compiled. It seems more reasonable to declare it proper and expected behavior.
From: hotspot-compiler-dev [mailto:hotspot-compiler-dev-bounces at openjdk.java.net] On Behalf Of Roland Westrelin
Sent: Monday, January 05, 2015 5:38 PM
To: hotspot compiler
Subject: RFR(S): 8063086: Math.pow yields different results upon repeated calls
With 8029302, C2 computes x^2 as x*x. The interpreter and C1 code don’t have the special case code and as a result an application can see different result for the same computation whether it’s executed by the interpreter/c1 or c2. Fixed by adding the special case to the interpreter and C1.
More information about the hotspot-compiler-dev