Message415214
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. |
|
Date |
User |
Action |
Args |
2022-03-15 01:05:59 | JelleZijlstra | set | recipients:
+ JelleZijlstra, docs@python, w0rthle$$ |
2022-03-15 01:05:59 | JelleZijlstra | set | messageid: <1647306359.09.0.145976532589.issue47020@roundup.psfhosted.org> |
2022-03-15 01:05:59 | JelleZijlstra | link | issue47020 messages |
2022-03-15 01:05:59 | JelleZijlstra | create | |
|