What Does Not a Number (NaN) Mean?
Not a Number (NaN) represents an undefined number in floating-point operations. A Not a Number indicator may also be a sign that a variable that is supposed to be a numerical value has been corrupted by text characters or symbols.
Techopedia Explains Not a Number (NaN)
When an operating system tries to compile a real number with floating-point operations, there are any number of reasons why it may not be able to represent that number. A false command such as an impossible square root can trigger a NaN value. So can data corruption or clerical errors, as previously mentioned. NaN can also be expressed in many ways. Some operating systems use a hash character (#) along with NaN, or use prefixes and suffixes such as S, Q and %. It should be noted that while sophisticated operating systems can use these errors to deal with error inputs, older and more primitive operating systems might have instead crashed, or become frozen in infinite loops.