From: Sergey B Kirpichev Date: Tue, 11 Nov 2025 10:13:59 +0000 (+0300) Subject: gh-141004: document Py_INFINITY and Py_NAN macros (#141145) X-Git-Tag: v3.15.0a2~114 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d69447445cbacf7537bf59c5c683a3b17060312d;p=thirdparty%2FPython%2Fcpython.git gh-141004: document Py_INFINITY and Py_NAN macros (#141145) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst index 9e703a46445d..eae4792af7d2 100644 --- a/Doc/c-api/float.rst +++ b/Doc/c-api/float.rst @@ -78,6 +78,24 @@ 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 ```` 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 ```` header. + + .. c:macro:: Py_MATH_El High precision (long double) definition of :data:`~math.e` constant.