How to test if float is NaN?
    clayasaurus 
    clayasaurus at gmail.com
       
    Tue May 16 22:10:41 PDT 2006
    
    
  
Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> clayasaurus schrieb am 2006-05-17:
>> How do you test if float is Nan? == and is doesn't seem to work.
> 
> 1)
> #
> # if(num !<>= 0.0){
> #     // ...
> # }
Nice, learn something new every day.
> 
> 2)
> # import std.math;
> #
> # if(isnan(num)){
> #     // ...
> # }
> 
> Thomas
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iD8DBQFEaqeQ3w+/yD4P9tIRAk/1AJsHaMIYMVQ1GgjTg8Yn3afE8ilMfgCfb+15
> BLGWcCiaGKR3GjBEeXtmZGg=
> =w7vc
> -----END PGP SIGNATURE-----
Thank you Thomas and Jarret :)
~ Clay
    
    
More information about the Digitalmars-d-learn
mailing list