Dismayingly, JavaScript's isNaN() function diverges from this special meaning, and does something close to what you said -- it tests to see if something is at least almost a number. So isNaN(13/0) and isNaN('foo') both evaluate to 'true', whereas isNaN('1') and isNaN(42) both evaluate to 'false'.
The idea was more like "isNaN(myForm.myField)"?
For all I know, the above might actually still work. But either way, that explains Javascript type conversion logic.
char *p = "abc";
Yet, this yields true: p == p
The square root of -1 is easily representable in floating math. You just need two floats to make a complex.I agree with making accesses of NaN-valued variables undefined behavior, so that not comparing equal is then a possible consequence of undefined behavior.
I don't agree with defining the unequal comparison as the required behavior. To define the behavior is tantamount to the recognition that a NaN is something: an object. A variable can have a defined value which is that something, and that value must obey the Law of Identity.