On Mon, Oct 08, 2012 at 11:44:12PM -0700, Guido van Rossum wrote:
This smells like a bug in the != operator, it seems to fall back to not == which it didn't used to. More later.....
I'm pretty sure the behaviour is correct. When I get home this evening, I will check my copy of the Standard Apple Numerics manual (one of the first IEEE 754 compliant systems). In the meantime, I quote from
"What Every Computer Scientist Should Know About Floating-Point Arithmetic"
"Since comparing a NaN to a number with <, ≤, >, ≥, or = (but not ≠) always returns false..."
(Admittedly it doesn't specifically state the case of comparing a NAN with a NAN.)