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

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Sep 25 04:34:34 PDT 2014


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

--- Comment #6 from Leandro Lucarella <leandro.lucarella at sociomantic.com> ---
(In reply to Leandro Lucarella from comment #5)
> What the relation of signaling NaN and this. Will `if (nan)` raise a signal?

Or any following use of nan afterwards, like `lround(fabs(x))`.

f the 
> Maybe a runtime check is enough.
> 
> It's clear that the code that raise this problem is buggy, no argue about
> that, but how to fix it is not the topic of this issue, the topic is trying
> to find a way to make the bug impossible to even exist, with help from the
> language :)

--


More information about the Digitalmars-d-bugs mailing list