As a reply in general (sorry tidy, just clicked on yours), the fact that various computing languages provide a particular answer, does not prove that it is correct. All it proves is that is how the creator/compile interpreted it. And that interpretation may or may not be correct - something that not many of here appear to be sure of.
Just to let you know, Ill interpret that above how I like and I may take it as correct or incorrect or a possable result of NAN.