What is that for a value, -1.#IND00?

  • Thread starter Thread starter Thorsten
  • Start date Start date
T

Thorsten

Hi

I have a little problem to check a double value. During a multiplication
with really small values my result value is set to -1.#IND00. So does anyone
knows how I can check the value if it is -1.#IND00? Is there a constant to
compare it with? And bye the way, what does this value mean?

Thanks for any help

Thorsten
 
OK found the problem. It is a division with 0. But anyway is there a
constant to check the result value?

Cheers
Thorsten
 
Thorsten said:
*OK found the problem. It is a division with 0. But anyway is ther
a
constant to check the result value?
*

-1.#IND00 is repsentation of NaN(Not a Number) value. You may check i
with following function

int _isnan(double x);

from float.h. It returns a nonzero value if the argument x is a NAN
otherwise it returns 0


-
Anatol
 
Thorsten said:
OK found the problem. It is a division with 0. But anyway is there a
constant to check the result value?

This is a NaN (Not a Number), used to represent arithmetic errors such as
divisions by zero. There are various functions to check for a NaN, depending
on your environment. In .NET, Double.IsNaN is the most obvious. An
interesting property of NaN, is that it isn't equal to anything, evn to
itself

Arnaud
MVP - VC
 
Thanks for the info with NaN. I have found a function (_isnan) or the NAN
definition to check if it is not a number in native C. But anyway I have
change my program so that it will not happent again.

Cheers
Thorstren
 
Back
Top