double.init is nan ..?
Adam D. Ruppe
destructionator at gmail.com
Fri Mar 14 10:01:59 PDT 2014
On Friday, 14 March 2014 at 16:50:11 UTC, bearophile wrote:
> Keep in mind that there are many NaNs, and double.nan is not
> the same as dounle init.
Oh yeah, I forgot about that! (double.init is a signaling nan
while double.nan is not. There's a whole bunch of other nans
possible in floating point too btw)
You're right. Looks like "is" always just compares the raw bits,
which is good stuff when comparing with init.
> So this passes:
>
> assert(test is double.init);
More information about the Digitalmars-d
mailing list