JDK-8255368 : Math.exp() gives wrong result for large values on x86 32-bit platforms
Type:Bug
Component:hotspot
Sub-Component:compiler
Affected Version:11,15,16
Priority:P3
Status:Resolved
Resolution:Fixed
CPU:x86
Submitted:2020-10-23
Updated:2024-12-20
Resolved:2020-11-18
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
exp(10000) give result as 0 instead of positive infinity on x86 32-bit platforms.
This is a bug in the 32-bit intrinsic.
Comments
[~aleonard] I've sponsored the OpenJDK 11u push for you.
24-02-2021
Fix Request
Sponsored fix request comment on behalf of Andreas Ahlenstorf <andreas@ahlenstorf.ch>. Backporting this patch fixes a problem with Math.exp() giving wrong results for very large numbers on x86 (32 bit). The patch was directly exported from openjdk/jdk and applies cleanly to 11u. Running tier1 tests on Windows did not yield additional test failures and the test included in the patch passes, too. The patch corrects the x86 intrinsic of Math.exp() and should therefore have a small impact.