Anyone seem this before?

BlitzMax Forums/BlitzMax Programming/Anyone seem this before?

Sean Doherty(Posted 2005) [#1]
My program is crashing and I printed the position of a object and here is what I get:

"-1.#IND0000 "


deps(Posted 2005) [#2]
My guess is that the value is too small. Way to small.

Edit: Because it's a # and the word "IN", as in "Infinie"(?).


Hotcakes(Posted 2005) [#3]
Uh, no, I believe -1.#INF0000 is Infinity. Perhaps what you have come across is Not A Number (NaN in B+/B3D)? Basically you've done some mathematical operation which defies mathematics =] I *think*, but I'm not sure, if you use Integers instead of Floats that your variable will be set to 0 (or, if I'm wrong, a value in the billions:).

You have two options. 1) Find the place in your code that is creating this rogue 'value' and correct your algorithm so that it never happens (ie make sure you aren't do a divide by 0 (which would create Infinity), or a square root of 0 (I'm bad at maths, but it was something like that I think), or some silly thing like that) or 2) before you need to use the variable do a check for If variable=1.#IND0000 Then variable=0 or whatever.

deps:Inifnity is way too big, not way too small. =]


Dreamora(Posted 2005) [#4]
Naw this means that the value is smaller than the smallest possible machine number. Normally due to funny multipliction or division error.
Most likely its a /0 as mentioned or a division with a thing that was /0 which means a division by infinity which in threotical maths result in 0 but in nontheoretical it will be an underflow.
(and nearly 0 is about the same as 0 and results in this kind of calculation unprecision problems as well)


Hotcakes(Posted 2005) [#5]
Ah yes, of course... /0 would produce Infinity, /Infinity produces a void in the space/time continuum.