float.nan is not itself ?

Joshua Reusch yoschi at arkandos.de
Tue Feb 14 07:39:37 PST 2012


Hello,

why does this assertion fail:

 > assert(float.nan == float.nan);

there is the std.math.isNaN function which works correctly, but why can 
I not just use the comparison ?

Thanks, Joshua


More information about the Digitalmars-d-learn mailing list