3

What is the meaning of the symbol -1.$e+000? In what category are these kind of things included or with what keywords I can search them?

enter image description here

EDIT: After increasing precision this is what I got:

enter image description here

Shibli
  • 5,879
  • 13
  • 62
  • 126

2 Answers2

6

That symbol is the Windows representation of NaN.

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
mskfisher
  • 3,291
  • 4
  • 35
  • 48
5

When you see -1.#INF, -1.#IND and similar text for formatted numerical output, you're on Microsoft Visual Studio and you're seeing a special floating-point type that cannot be represented by a number... that is, either infinity or NaN ("not a number").

You can get the variant -1.#J by specifying precision in printf, and you can get -1.$ by specifying low precision in iostreams.

The e+000 is just a suffix from scientific notation, indicating an exponent of 0. It's safely ignored.

On Linux GCC you tend to see the text inf and nan instead.

Community
  • 1
  • 1
Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055