• Advertisement
Sign in to follow this  

1.#QNAN00

This topic is 4899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
I think it's the value for NaN, although I'm not sure. My source: google for 1.#QNAN00 floating point.

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
Quote:
Original post by smart_idiot
isfinite(somenumber)

Awesome. I've found
int _finite(double)
with a search of that function. Thanks a lot everyone.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement