FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.13] gh-141004: Document Py_HUGE_VAL/IS_FINITE/IS_INFINITE/IS_NAN (GH-141544) by skirpichev · Pull Request #141700 · python/cpython · GitHub

/ cpython Public
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
36 changes: 36 additions & 0 deletions Doc/c-api/float.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Floating-Point Objects
the C11 standard ``<math.h>`` header.


.. c:macro:: Py_HUGE_VAL

Equivalent to :c:macro:`!INFINITY`.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`.


.. c:macro:: Py_MATH_E

The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` constant.
Expand Down Expand Up @@ -140,6 +148,34 @@ Floating-Point Objects
return PyFloat_FromDouble(copysign(INFINITY, sign));


.. c:macro:: Py_IS_FINITE(X)

Return ``1`` if the given floating-point number *X* is finite,
that is, it is normal, subnormal or zero, but not infinite or NaN.
Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isfinite` instead.


.. c:macro:: Py_IS_INFINITY(X)

Return ``1`` if the given floating-point number *X* is positive or negative
infinity. Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isinf` instead.


.. c:macro:: Py_IS_NAN(X)

Return ``1`` if the given floating-point number *X* is a not-a-number (NaN)
value. Return ``0`` otherwise.

.. deprecated:: 3.14
The macro is :term:`soft deprecated`. Use :c:macro:`!isnan` instead.


Pack and Unpack functions
-------------------------

Expand Down
Loading

Back | FazBrowse Home | New Git URL