[Issue 16341] 32-bit floating-point issue
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 31 03:57:03 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16341
ag0aep6g at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |ag0aep6g at gmail.com
Resolution|--- |INVALID
--- Comment #1 from ag0aep6g at gmail.com ---
I think this is due to D allowing floating points operations to be done at a
higher precision than is stated in the source.
That is, `fun` may do its calculations with doubles or reals, and it may return
a double or real in a register. The same applies to `working` and `failing`,
but `working` puts the results from `fun` on the stack first, forcing a
conversion to float, while `failing` returns directly, so the operands are not
converted to float.
Note that the assert passes when you compile with -O, because then `working` is
optimized to behave like `failing`.
Closing as INVALID. Feel free to reopen if you disagree.
--
More information about the Digitalmars-d-bugs
mailing list