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 vstinner
Recipients mark.dickinson, vstinner
Date 2022-03-10.16:56:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646931384.47.0.790663844997.issue46917@roundup.psfhosted.org>
In-reply-to
Content
> Remove code handling missing NAN and infinity: float("nan"), float("inf"), math.nan and math.inf are always available.

The code to support missing NaN was already removed by:

New changeset 1b2611eb0283055835e5df632a7a735db8c894b8 by Victor Stinner in branch 'main':
bpo-46656: Remove Py_NO_NAN macro (GH-31160)
https://github.com/python/cpython/commit/1b2611eb0283055835e5df632a7a735db8c894b8

In fact, math.inf is already always available in Python 3.10 and older. There was no "#ifdef" for missing infinity support. In Python 3.10, math.inf is implemented as:

static double
m_inf(void)
{
#ifndef PY_NO_SHORT_FLOAT_REPR
    return _Py_dg_infinity(0);
#else
    return Py_HUGE_VAL;
#endif
}
History
Date User Action Args
2022-03-10 16:56:24vstinnersetrecipients: + vstinner, mark.dickinson
2022-03-10 16:56:24vstinnersetmessageid: <1646931384.47.0.790663844997.issue46917@roundup.psfhosted.org>
2022-03-10 16:56:24vstinnerlinkissue46917 messages
2022-03-10 16:56:24vstinnercreate