Errors in specification?

Jarrett Billingsley kb3ctd2 at
Thu Jun 12 16:15:43 PDT 2008

"Simen Haugen" <simen.haugen at> wrote in message 
news:g2s4uk$2nt7$1 at
> This is the property example from 
> ...
> Ditto for other types.

The behavior of .init was changed in 1.017.  Per-variable .inits now just 
get the .init of the type.  I don't know why the spec hasn't been updated to 

> And is it possible to check if a float is nan?
> float f2;
> f2 is float.nan; // false
> f2.init is float.init; // false
> float.nan is float.nan; // false...

Either use std.math.isnan/tango.math.IEEE.isNaN, or a somewhat.. funnier 
looking method:

float f2;
f2 !<>= f2; // true 

More information about the Digitalmars-d-learn mailing list