问题
I could neither find it via google, search here or on Microsofts helppages...
After some extensive calculations, sometimes, when outputting my doubles via std::cout
i prints as result on console:
-1.#IND
There are no modifcations(like precision etc) to the cout-stream. I assume the program wants to tell me about some sort of error, but I can't figure it out :/ It doesn't happen that often but with a low frequency (it is a genetical algorithm, so i have an output after every generation, and in about every 5th to 10th generation this seems to happen...)
For information, I'm using Visual Studio Pro 2013.
回答1:
Windows displays NaN as -1.#IND. NaN is a result of a mathematical operation that does not make sense. For example, 0.0 / 0.0, or sqrt(-1.0) will return NaN. I can't really help further without more details about the underlying operation. Hopefully this is enough to point you in the right direction, though.
来源:https://stackoverflow.com/questions/23525192/what-does-1-ind-mean-double-stream-output