> On Jan 17, 2019, at 16:13, Peter Otten <[email protected]> wrote:
> 
> David Rock wrote:
> 
>> both a and nan are floats, so why does a == a work, but nan == nan
>> doesn’t?
> 
> It does "work", it's only produces a result you didn't expect ;) 
> Python just follows the standard here
> 
> https://en.wikipedia.org/wiki/IEEE_754
> https://en.wikipedia.org/wiki/NaN#Comparison_with_NaN
> 
> Also:
> 
> https://stackoverflow.com/questions/10034149/why-is-nan-not-equal-to-nan

Touché :-)


— 
David Rock
[email protected]




_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to