# NaN NaN NaN Nan, Hey Hey, Good Night

• In addition to a fairly humorous article, take a look at the posting date on this CNN page ... http://www.usatoday.com/news/nation/2002-08-08-breast-milk_x.htm

(from Enric Naval)

• Does that stand for "Not a number"?

Odd.

• NaN is not odd, it's even.

• WTF kind of processing are they doing to the dates to get this kind of output?
Can anybody work out the original date?

• I suspect it's server-side Javascript generating the date, and whatever data string was supplied to the Date() object during processing didn't work out right, so all the Date methods just returned NaN.

And, for the record, the lyric is "...hey hey, good bye."

• The thing that really make me say WTF is the article in itself, after all I don't care when it was posted, and UsaToday knew it so it put NaN instead of the actual date according to my user preferences, isn't it?

• NaN is part of the spec for floats.  Such as the result of dividing by 0.  If you use ToString or an equivalent on a float with the value NaN, it should display the string "NaN".  The question would be why the float is getting the value NaN since it would seem unlikely that date formatting should hit the common divide by 0 case.  Probably some string to float parsing routine or some such that returns NaN when it cannot parse the string.  In these cases, the Exceptions that would normally be generated would be supressed.

• @Taliesin said:

The thing that really make me say WTF is the article in itself,

Seconded. What exactly is so "embarassing and disgusting" about being
asked to drink something you were going to feed your kid that you'd go
to court over it?

• There are 4 operations that result in NaN:
±0 ÷ ±0
Inf - Inf
±Inf ÷ ±Inf
±Inf × 0

A "division by zero" most commonly results in ±Inf (Infinity).
Further operations on ±Inf usually result in a NaN.

The single most important facet of NaN is that it is not equal to itself.
NaN != NaN

In fact, in a language like C/C++; the following pseudo-code;
let float value = NaN
if( value != value )
print( "NaN\n" )

• @Xarium said:

There are 4 operations that result in NaN:
±0 ÷ ±0
Inf - Inf
±Inf ÷ ±Inf
±Inf × 0

A "division by zero" most commonly results in ±Inf (Infinity).
Further operations on ±Inf usually result in a NaN.

The single most important facet of NaN is that it is not equal to itself.
NaN != NaN

In fact, in a language like C/C++; the following pseudo-code;
let float value = NaN
if( value != value )
print( "NaN\n" )

On the web, think "could be JavaScript". NaN is also returned for the value and the components (getDate(), getMonth(), getFullYear()) for an invalid Date object -- which is exactly what seems to have happened here.

• human breastmilk is very fatty and IMHO not very tasty. Perhaps thats it?

• @Ulvhamne said:

human breastmilk is very fatty and IMHO not very tasty. Perhaps thats it?

Yeah but who cares if you're getting it right from the cow...hmmmm......woman

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.