Jelle Zijlstra <jelle.zijls...@gmail.com> added the comment:

I'm guessing you're referring to 
https://docs.python.org/3.8/library/math.html#math.nan. The text says 
explicitly that math.nan is "equivalent" to float("nan"), not that it is equal. 
This is correct.

nan is not equal to itself, because (for better or worse) that's what the IEEE 
standard requires. You can instead use math.isnan() to check whether a number 
is a nan.

----------
nosy: +JelleZijlstra

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue47020>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to