I have a program that tries to shrink a double down to a desired number. The output I get is NaN.
double
NaN
What does NaN mean in Java?<
NaN means "Not a number." It's a special floating point value that means that the result of an operation was not defined or not representable as a real number.
See here for more explanation of this value.