Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the meaning of -1.#IND00 and -1.#QNAN0?

Status
Not open for further replies.

maluk

Programmer
Oct 12, 2002
79
0
0
SG
What is the meaning of -1.#IND00 and -1.#QNAN0? Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.

- janvier -
 
Right about Rome.

You would obtain such results by trying, let's say, sqrt(-1).
NAN means Not A Number.
Same result will be obtained when doing 10/0, for instance.

These strings are just cookies to be seen in the standard err; probably the best way to check for a faulty outcome of such an operation would be to check the result against the min/max double values definded in <limits.h>. Of course, if your program is still running after such a disaster!

But hey... the BEST thing is Not to get there in the first place!

Cheers,
--Razvan [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Thanks!

I do like to know where you got that information. Is there a documentation for this? I searched MSDn and I have not found an entry like this.

Where can I get documentation for this? Rome did not create a great empire by having meetings, they did it by
killing all those who opposed them.

- janvier -
 
Well, I found related articles by looking for IND00. The most interesting is called
&quot;FIX: Calling a Function Returning double May Not Pop FPU Stack&quot;,
which was just what was happening to my code (I was still in the debug version - /Od).

--Razvan
[red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top