Jump to content
  • Advertisement
Sign in to follow this  
skullbonez

MS Visual C++ -1.#IND000

This topic is 4832 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

Hi, I use Visual C++ 2003 - I am writing a win32 application, and I was wondering is there ANYTHING on the internet, or in MSDN articles that will describe the float error codes such as -1.#IND000 - obviously it means my float is stuffed, but can I write expressions to work out when this is happening? Or can I set a flag to give me a debug assertion error when any of my data turns bad like this? It is SO ANNOYING, because I know if I was developing this in C#, the debugger would tell me exactly when something like this happens - in C++ all that happens is that my program falls over, and it is up to me to find out where it is messing up - and when we are talking about a 5000 line program it takes me hours to obtain the location of where this is happening. Any help here would be greatly appreciated, I am going insane debugging this problem. Thanks, -Simon

Share this post


Link to post
Share on other sites
Advertisement
I believe there are only two possibilities, it can be infinite or 'not a number' (which, I think, is the one you have). To check if a float is infinite or not use the _finite() function, to check if a float is a number use _isnan().

Tom

EDIT: and to include a page where all this floating point stuff (including the function mentioned by SiCrane) is collected: more MSDN.

Share this post


Link to post
Share on other sites
Try putting this function call early in your program's execution: _controlfp(0, _MCW_EM); This should signal the processor to generate exceptions on all instances of floating point unhappiness.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!