double.init is nan ..?

bearophile bearophileHUGS at lycos.com
Fri Mar 14 09:06:16 PDT 2014


Etienne:

> I'm trying to compare two doubles as part of a cache framework. 
> To put it simply, double.init == double.init ... is false?
>
> I don't understand. Maybe this belongs is D.learn, but I have 
> no idea why or how this could possibly be normal behavior.
>
> Does anyone have a clue? Thanks!

Yes, it's a question for D.learn. And double.init is a NaN. NaN 
comparisons return false.

Bye,
bearophile


More information about the Digitalmars-d mailing list