Constant 'not a number' value

BlitzMax Forums/BlitzMax Beginners Area/Constant 'not a number' value

H&K(Posted 2006) [#1]
Can someone explain NAN to me.

I understand NULL, so you can use that in your explination if you need to. And equaly I understand Const in useage as True/False etc

Code would be appreachiated, but a nice definition and use definition would be better.

Thanks in advance

Edit: I ment to post this in the beginer area. Can Someone Move it for me
Map! Map! We dont need no stinkin' map



Koriolis(Posted 2006) [#2]
It's a special float value (there is no equivalence for integers) that denotes an invalid float number.

By example, you also have special values to denote infinity, and if you divide infinity by infinity thna you get a NaN becuse dividing infinity by infinity makes no sense and has no meaningful result.

http://en.wikipedia.org/wiki/NaN


H&K(Posted 2006) [#3]
Merci Koriolis. Comment difficile serait-il pour que mettent-ils cela dans les Docs?


Dreamora(Posted 2006) [#4]
No, it is not documented.
#NaN and #INF are values that are given back like this from the system itself, not a value created by BM.


Koriolis(Posted 2006) [#5]
Taking french courses H&K :) ?
A few mistakes but otherwise you're clearly on the right track. Or was that babelfish ;) ?


H&K(Posted 2006) [#6]
BabelFish! BabelFish! What is this Babelfish you talk of ;)

I went to a cafe had a beer left, came back with a friend and said
"Bonjour encore monsieur. Je voudrais deux bières merci"

And got a toasted ham and cheese sandwich


Dreamora(Posted 2006) [#7]
Babelfish is a truely craptastic translation bot on the web.

And you should not drink beer if it results in french :P