
#9304: Floating point woes; Different behavior on 32- vs 64-bit x86
-------------------------------------+------------------------------------
Reporter: lerkok | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: | Keywords: floating point
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By: 9276
Blocking: | Related Tickets:
-------------------------------------+------------------------------------
Changes (by rwbarton):
* priority: high => normal
Comment:
The optimizer is constant-folding the multiplication in Carter's first
test program, but not the second (thanks to NOINLINE). The one mystery to
me is why this constant folding is apparently performed using 64-bit
floating point while multiplication in GHCi is apparently performed using
80-bit floating point. Edward's comments explain the rest of the observed
behavior. You can see the same behavior in C:
{{{
#include