Why do some T.init evaluate to true while others to false?

ArturG via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu May 26 08:34:50 PDT 2016


On Thursday, 26 May 2016 at 15:29:52 UTC, Basile B. wrote:

>
> float.init is not equal to 0.0f. In D FP points values are 
> initialized to nan (not a number).
>
> By the way for strings it works, it's like the array case I 
> described in the first answer).

yes i guess i tested all/most types and know that float.init is 
float.nan but why is nan true and not false?


More information about the Digitalmars-d-learn mailing list