]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202)
authorSebastian Berg <sebastianb@nvidia.com>
Wed, 10 May 2023 16:44:52 +0000 (18:44 +0200)
committerGitHub <noreply@github.com>
Wed, 10 May 2023 16:44:52 +0000 (17:44 +0100)
commit7a3b03509e5e3e72d8c47137579cccb52548a318
treecbb1adddb46665552cb1e93ccae135aac0507e80
parenta7a2dbbf72aceef61bfb50901bfa39bfb8d6d229
gh-104263: Rely on Py_NAN and introduce Py_INFINITY (GH-104202)

This PR removes `_Py_dg_stdnan` and `_Py_dg_infinity` in favour of
using the standard `NAN` and `INFINITY` macros provided by C99.
This change has the side-effect of fixing a bug on MIPS where the
hard-coded value used by `_Py_dg_stdnan` gave a signalling NaN
rather than a quiet NaN.
---------

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
12 files changed:
Include/internal/pycore_dtoa.h
Include/pymath.h
Lib/test/test_cmath.py
Lib/test/test_complex.py
Lib/test/test_float.py
Lib/test/test_math.py
Misc/NEWS.d/next/Core and Builtins/2023-05-08-10-34-55.gh-issue-104263.ctHWI8.rst [new file with mode: 0644]
Modules/cmathmodule.c
Modules/mathmodule.c
Objects/floatobject.c
Python/dtoa.c
Python/pystrtod.c