https://github.com/python/cpython/commit/8b9494099ace29df8619391d7449ca4b18917ce8 commit: 8b9494099ace29df8619391d7449ca4b18917ce8 branch: 3.14 author: Sergey B Kirpichev <[email protected]> committer: vstinner <[email protected]> date: 2025-11-11T14:52:37+01:00 summary:
[3.14] gh-141004: document Py_INFINITY and Py_NAN macros (GH-141145) (#141399) (cherry picked from commit d69447445cbacf7537bf59c5c683a3b17060312d) Co-authored-by: Stan Ulbrych <[email protected]> files: M Doc/c-api/float.rst diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index edee498a0b80f3..21e254aa6fb600 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -78,6 +78,34 @@ Floating-Point Objects Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`. +.. c:macro:: Py_INFINITY + + This macro expands a to constant expression of type :c:expr:`double`, that + represents the positive infinity. + + On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from + the C11 standard ``<math.h>`` header. + + +.. c:macro:: Py_NAN + + This macro expands a to constant expression of type :c:expr:`double`, that + represents a quiet not-a-number (qNaN) value. + + On most platforms, this is equivalent to the :c:macro:`!NAN` macro from + the C11 standard ``<math.h>`` header. + + +.. c:macro:: Py_MATH_El + + High precision (long double) definition of :data:`~math.e` constant. + + +.. c:macro:: Py_MATH_PIl + + High precision (long double) definition of :data:`~math.pi` constant. + + .. c:macro:: Py_RETURN_NAN Return :data:`math.nan` from a function. _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
