In Java, what does NaN mean?

Taken from this page:

“NaN” stands for “not a number”. “Nan”
is produced if a floating point
operation has some input parameters
that cause the operation to produce
some undefined result. For example,
0.0 divided by 0.0 is arithmetically undefined. Taking the square root of a
negative number is also undefined.

Leave a Comment