On 2012-10-04 15:07, Mike Graham wrote:
On Thu, Oct 4, 2012 at 10:02 AM, Mathias Panzenböck firstname.lastname@example.org wrote:
On 10/04/2012 03:53 PM, Steven D'Aprano wrote:
py> NAN == NAN False
Why isn't this True anyway? Is there a PEP that explains this (IMHO odd) behavior?
IEEE 754 specifies this.
Think of it this way:
Calculation A returns NaN for some reason
Calculation B also returns NaN for some reason
Have they really returned the same result? Just because they're both NaN doesn't mean that they're the _same_ NaN...