I have a program that tries to shrink a double
down to a desired number. The output I get is NaN
.
What does NaN
mean in Java?<
NaN
means “Not a Number” and is basically a representation of a special floating point value in the IEE 754 floating point standard. NaN generally means that the value is something that cannot be expressed with a valid floating point number.
A conversion will result in this value, when the value being converted is something else, for example when converting a string that does not represent a number.