Has anyone already had this error. When using the debugger, the return of
( F * 3.14295 ) / 180 where F = 25 (double) is -1.#IND0 and I don't know why .
Thanks for your help.
Printable View
Has anyone already had this error. When using the debugger, the return of
( F * 3.14295 ) / 180 where F = 25 (double) is -1.#IND0 and I don't know why .
Thanks for your help.
I think this is b'coz of some out of range problem.
1) Check the proper type of the variables like F.
2) Or check the type of the variable which is storing the result.
-1.#IND0 looks like one of the IEEE special values. These are +Infinity (=1.0/0.0), -Infinity (=-1.0/0.0) and NaN (Not a Number, i.e. an invalid floating-point number). I can't remember which of these prints as -1.#IND0, and I can't see why your code should produce any of them.
I actually do not get this error when i tried. However since the number ends up being 33333.... at the end due to the divide if you use an int as the 'result' then you may run into a problem...what version of C++ are you using??