"NaN" is short for "not a number".Typically it shows up in numeric calculations where the computed value would be too large to fit in the computer or calculator. It can be thought of as meaning "infinite" as, for example, 1 divided by a very very small number produces a huge quotient: 1/x, as x goes to 0, goes to infinity.