Sign in to follow this  
Woodsman

1.#QNAN00

Recommended Posts

I've tried googling it, checking mine and the online MSDN as well as searching the forums here, but I've found nothing on what "1.#QNAN00" means with respect to a floating point value. It seems awfully familiar. I'm generating single precision floats, and occasionally a function call to a 3rd party library evaluates to "1.#QNAN00" I'm not sure yet whether this is a problem or not, as I'm not even sure what it is. Any help?

Share this post


Link to post
Share on other sites
It's a text representation of "Quiet NaN" (Not a Number), which basically means that your result is ... not a number. Operations which yields results which aren't reals (e.g. square root of a negative number, infinity minus infinity ...) will yield a NaN.

See the IEEE 754 standard on floating point numbers.

Share this post


Link to post
Share on other sites
Hmm, ok. I saw the "NaN" when googling, but wasn't sure what that was. That's rather unfortunate as I'm giving the library numbers and its yielding NaN's... That's not very useful to me if I can't use the result.


Thanks both of you.

Share this post


Link to post
Share on other sites
Actually, is there a standard way of testing for this, or must I resort to some crafty bit examination? I'm running across "-1.#IO" now as well, which is helping NaN to totally screw up my results. In fact, it just occured to me that I don't think you can & floating point values...

[Edited by - Woodsman on September 20, 2004 10:38:20 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by petewood
what's the library? are you giving it good data?

It's a physics library (which I am acceptably destabilizing initially). If it says that I've broken something (as it is doing I believe, with these return values) I'd like to be able to keep track of that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this