[issue46917] Require IEEE 754 floating point to build Python 3.11
STINNER Victor
report at bugs.python.org
Thu Mar 10 11:56:24 EST 2022
STINNER Victor <vstinner at python.org> added the comment:
> 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
}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46917>
_______________________________________
More information about the Python-bugs-list
mailing list