Skip to main content
GameDev.net gamedev.net
🔒 Locked

-1.#IND

Started by alnite Apr 28, 2004 at 5:14 PM 2 replies 350+ views
Original Post
alnite
alnite
I print out a double and I get that number. Not sure what that means...
Agony
Agony
I forget which one it is specifically, but it indicates one of the special values of IEEE floating point numbers. These values include (I think) +/- infinity, and not-a-number. There might be a few more... Dunno, though. And the compiler/processor might limit what special values are used.

Bottom line, though, is that you did something wrong. Divided by zero, took the square root of a negative, multiplied two really ungodly large numbers together, something. These special values can be useful sometimes, but they're almost always a sign that something wrong happened, especialy if the user wasn't expecting them to occur.

[edited by - Agony on April 28, 2004 6:21:10 PM]
"We should have a great fewer disputes in the world if words were taken for what they are, the signs of our ideas nly, and not for things themselves." - John Locke o
SiCrane
SiCrane
-1.#IND is the representation of quiet NaN for float point values in MSVC (and probably a few other runtime implementations). A quiet NaN is a NaN that propogates throughout most floating point arithmetic operations. (As compared to a signaling NaN which raises an exception.)

Basically it means somewhere along the way you did an invalid operation on floating point numbers.
alnite
alnite
ha. as expected. I pass a number > 1 or < -1 to a acos;

thanks a lot.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.