Is D floating point semantics too advanced?
Lars Noschinski
lars-2006-1 at usenet.noschinski.de
Fri Aug 24 08:34:23 PDT 2007
* Hans-Eric Grönlund <hasse42g at gmail.com> [07-08-23 16:45]:
>Hello!
>
>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) {...}
In this case it seems unintuitive because you use NaN explicitly on the
right side. But you'd probably be surprised to see
0.0/0.0 == sqrt(-1.L)
evaluating to true.
More information about the Digitalmars-d
mailing list