[Issue 13489] Boolean semantics of floating point types should use "<> 0"

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Oct 9 04:01:51 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13489

monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com

--- Comment #12 from monarchdodra at gmail.com ---
(In reply to Don from comment #11)
> But I am certain that the current behaviour, that assert(NaN) passes, is
> wrong.

Agreed. It was my understanding anyways that anything that operates on NaN
produces "false" anyways.

I'd expect *both*:
assert( NaN);
assert(!NaN;

to fail, actually, since the fist one is "Are you non 0? No" and the second is
"Are you 0? No."

--


More information about the Digitalmars-d-bugs mailing list