mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.13] gh-141004: document Py_INFINITY and Py_NAN macros (GH-141145) (#141400)
(cherry picked from commit d69447445c)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
parent
6d37d948d4
commit
05e7b0dadf
1 changed files with 28 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue