Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Floating-Point Objects
``<math.h>`` header.

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


.. c:macro:: Py_NAN
Expand All @@ -99,6 +99,14 @@ Floating-Point Objects
the C11 standard ``<math.h>`` header.


.. c:macro:: Py_HUGE_VAL

Equivalent to :c:macro:`Py_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 @@ -147,6 +155,32 @@ Floating-Point Objects
return PyFloat_FromDouble(copysign(INFINITY, sign));


.. c:macro:: Py_IS_FINITE

Determines if the given floating-point number has finite value i.e. it is
normal, subnormal or zero, but not infinite or NaN.
Comment on lines +160 to +161
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Determines if the given floating-point number has finite value i.e. it is
normal, subnormal or zero, but not infinite or NaN.
Determines if the given floating-point number has finite value,
that is, it is normal, subnormal or zero, but not infinite or NaN.

Per the Docs Style guide.

- i.e.
+ , that is,


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


.. c:macro:: Py_IS_INFINITE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This macro does not exist? I presume you meant:

Suggested change
.. c:macro:: Py_IS_INFINITE
.. c:macro:: Py_IS_INFINITY


Determines if the given floating-point number is positive or negative
infinity.

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


.. c:macro:: Py_IS_NAN

Determines if the given floating-point number is a not-a-number (NaN) value.

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


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

Expand Down
Loading