Thread overview
what does "-nan" mean
May 24, 2008
Tower Ty
May 24, 2008
janderson
May 24, 2008
torhu
May 25, 2008
e-t172
May 25, 2008
Tower Ty
May 24, 2008
It does not mean  "null" , it does not mean "0" , it does not mean "" so just what does it signify

Not a number is cryptic . If it is not a number then just what is it ?
May 24, 2008
Tower Ty wrote:
> It does not mean  "null" , it does not mean "0" , it does not mean "" so just what does it signify
> 
> Not a number is cryptic . If it is not a number then just what is it ?

It signifies that whatever was assigned to the value was "not a number".  That is the program had no idea how to compute or assign a value given the input.  Its really a sentinel to indicate error or un-assignment.

-Joel
May 24, 2008
Tower Ty wrote:
> It does not mean  "null" , it does not mean "0" , it does not mean "" so just what does it signify
> 
> Not a number is cryptic . If it is not a number then just what is it ?

It's just a special bit pattern that floating point operations can result in when there's no sensible answer to put there.  Like when you divide by zero, or do other illegal operations.  If you do writefln(0/0.0), it will print 'nan'.
May 25, 2008
Tower Ty a écrit :
> It does not mean  "null" , it does not mean "0" , it does not mean "" so just what does it signify
> 
> Not a number is cryptic . If it is not a number then just what is it ?

http://en.wikipedia.org/wiki/NaN
May 25, 2008
e-t172 Wrote:

> Tower Ty a écrit :
> > It does not mean  "null" , it does not mean "0" , it does not mean "" so just what does it signify
> > 
> > Not a number is cryptic . If it is not a number then just what is it ?
> 
> http://en.wikipedia.org/wiki/NaN

Thanks to you all . If we had a preferred answer system the above  link would be the winner .