0

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.

Mahrgell
  • 280
  • 1
  • 11

1 Answers1

0

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.

David S.
  • 518
  • 3
  • 5