[issue28579] nan != nan

2016-11-01 Thread Tim Peters
Tim Peters added the comment: Yes, it's both intended and annoying ;-) The standard specifies that, by default, comparisons involving NANs are "unordered": a NAN is _none_ of "less than", "equal to", or "greater than" any other float, including any other NaN, and including itself. -

[issue28579] nan != nan

2016-11-01 Thread SilentGhost
SilentGhost added the comment: That's how IEEE 754's NaN is defined. Seem to be behaving according to the standard. -- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue28579] nan != nan

2016-11-01 Thread Liam Marsh
New submission from Liam Marsh: I found a really weird comportment with NANs: >>> from math import nan, isnan, inf >>> nan==nan False >>> nan!=nan True >>> a=nan # maybe get another instance would fix it (or so I thought) >>> a==nan False >>> a==a False >>> a is a True >>> # because `is` work