What is -1.#IND?

Hi

I'm trying to pass the (vector of vector) output of a wrapped object into another vector of vector. The line of code I have is:
 
vector<vector<double>> SampleMean(Inner->GetResultsSoFar());


where Inner is the wrapped object, which has the function GetResultsSoFar() which returns a vector of vector of size(1,1).
The vector of vector SampleMean is created successfully however the value passed for SampleMean[0][0] is -1.#IND.

What is -1.#IND?

Apologies if I haven't given enough information as I don't know what's relevant right now.
What makes you think the value is -1.#IND?

Can you show the definition of GetResultsSoFar()?
Last edited on
@Peter87: I'm guessing he printed SampleMean[0][0] and saw -1.#IND appear.

@OP: Most likely, the number you tried to save in SampleMean[0][0] is too large for its type. Generally [in my, limited, experience], there's a divide-by-zero to blame.
from http://www.johndcook.com/IEEE_exceptions_in_cpp.html


Windows displays a NaN as -1.#IND ("IND" for "indeterminate") while Linux displays nan.


So you're creating a NaN and Gaminic is probably on the money. You're dividing by zero somewhere.
Last edited on
thanks everyone for your help

knowing that -1.#IND indicated -infinity was very helpful in that I now know it was actually a number that was being passed.

... continuing to trace what values were being passed and what functions were and were not working. it turns out I wasn't passing the value of the wrapper into the wrapped object for it to do its work. very newbie error, great learning experience!
Topic archived. No new replies allowed.