Is D floating point semantics too advanced?
Walter Bright
newshound1 at digitalmars.com
Thu Aug 23 22:34:03 PDT 2007
Hans-Eric Grönlund wrote:
> I've written a post on my blog wondering if the floating point
> semantics is too advanced. The problem I have with it is that I can't
> write something like this:
>
> if (someValue == real.nan) {...}
>
> It will never be true, which - for me - is unintuitive.
The behavior is as specified by the floating point standard IEEE 754. To
change it would break from FORTRAN, C and C++ usage in a way that would
silently break code that is transliterated.
More information about the Digitalmars-d
mailing list