Skip to content

Commit d694474

Browse files
pythongh-141004: document Py_INFINITY and Py_NAN macros (python#141145)
Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 8435a22 commit d694474

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Doc/c-api/float.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ Floating-Point Objects
7878
Return the minimum normalized positive float *DBL_MIN* as C :c:expr:`double`.
7979
8080
81+
.. c:macro:: Py_INFINITY
82+
83+
This macro expands a to constant expression of type :c:expr:`double`, that
84+
represents the positive infinity.
85+
86+
On most platforms, this is equivalent to the :c:macro:`!INFINITY` macro from
87+
the C11 standard ``<math.h>`` header.
88+
89+
90+
.. c:macro:: Py_NAN
91+
92+
This macro expands a to constant expression of type :c:expr:`double`, that
93+
represents a quiet not-a-number (qNaN) value.
94+
95+
On most platforms, this is equivalent to the :c:macro:`!NAN` macro from
96+
the C11 standard ``<math.h>`` header.
97+
98+
8199
.. c:macro:: Py_MATH_El
82100
83101
High precision (long double) definition of :data:`~math.e` constant.

0 commit comments

Comments
 (0)