## digitalmars.D.learn - what does "-nan" mean

• Tower Ty (2/2) May 24 2008 It does not mean "null" , it does not mean "0" , it does not mean "" so...
• janderson (5/8) May 24 2008 It signifies that whatever was assigned to the value was "not a number"....
• torhu (5/8) May 24 2008 It's just a special bit pattern that floating point operations can
• e-t172 (2/5) May 25 2008 http://en.wikipedia.org/wiki/NaN
• Tower Ty (2/8) May 25 2008 Thanks to you all . If we had a preferred answer system the above link ...
Tower Ty <towerty msn.com.au> writes:
```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
torhu <no spam.invalid> writes:
```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 24 2008
e-t172 <e-t172 akegroup.org> writes:
```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
Tower Ty <towerty msn.com.au> writes:
```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