[Issue 8745] floating point comparison ("is" vs "==") inconsistency (on 32)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 2 11:15:56 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8745
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |r.sagitario at gmx.de
--- Comment #3 from Rainer Schuetze <r.sagitario at gmx.de> 2012-10-02 11:16:06 PDT ---
I haven't checked the disassembly, but I guess the problem of the failing
comparison is caused by storing one value to memory as double (and doing some
rounding on it along the way), while the other is still available on the FPU
stack with real-precision. You might get different results when enabling
optimizations.
The "is" comparison is a bitwise comparison, so it will probably actually write
both values to memory before the comparison, applying the same rounding to both
results.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list