Please see my comment to the question.
NaN (not a number) is one of the legitimate values added to the domain of the floating-point type, to denote "not a number" result of some calculations, such as division 0.0/0.0 (it does not cause exception but returns NaN). This is the part of the IEEE-754 standard. Please see:
http://en.wikipedia.org/wiki/Floating_point[
^],
http://en.wikipedia.org/wiki/IEEE_754[
^].
The question is not 100% clear, but one source of such value is the Javascropt call
parseFloat(string)
. It will return NaN is the string cannot be interpreted in a numeric format. Please see:
http://www.w3schools.com/jsref/jsref_parsefloat.asp[
^].
—SA