This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JelleZijlstra
Recipients JelleZijlstra, docs@python, w0rthle$$
Date 2022-03-15.01:05:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647306359.09.0.145976532589.issue47020@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-03-15 01:05:59JelleZijlstrasetrecipients: + JelleZijlstra, docs@python, w0rthle$$
2022-03-15 01:05:59JelleZijlstrasetmessageid: <1647306359.09.0.145976532589.issue47020@roundup.psfhosted.org>
2022-03-15 01:05:59JelleZijlstralinkissue47020 messages
2022-03-15 01:05:59JelleZijlstracreate