Here's what I had in my own notes regarding NaN...
NaN is non-ordinal, so relational comparisons involving NaN always result in false. The only exception is NaN != NaN, which returns true. Wrapper methods Float.isNaN(float) and Double.isNaN(double) can be used to test for NaN. Alternatively, a float or double is NaN if it is not equal to itself (e.g., x != x).
Math.round(Float.NaN) results in an int zero, and Math.round(Double.NaN) results in a long zero.
String literals "NaN" and "Infinity" are acceptable for Float and Double constructors.
float or double division by zero results in +/- Infinity; except dividing zero by zero, which results in NaN.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org