|
-
November 24th, 2008, 12:13 AM
#1
a -1.#IND problem
hello guys,
my program crashes, because some of the floats have a value of -1.#IND
i know it is a symbol for infinity and probably caused by overflow.
but my question is how to debug this error.
i want to add some lines in the code like:
if(value==-1.#IND)
...
therefore, i can identify the location where the wrong value is computed.
however, it seems that the compiler i'm using, which is visual studio 2008, doesn't recognize "-1.#IND"
so i don't know how to do this. please help. thank you very much.
-
November 24th, 2008, 12:48 AM
#2
Re: a -1.#IND problem
You might have isinf() and isnan() functions available. Not every compiler does, but they're handy if you have them.....
-
November 24th, 2008, 01:30 AM
#3
Re: a -1.#IND problem
If you are using Visual Studio, you can turn specific Exceptions on so you can catch it in debugger right when it happens.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|