Skip to content

Commit d2a1cbe

Browse files
committed
gh-141004: document Py_HUGE_VAL/IS_FINITE/IS_INFINITE/IS_NAN
1 parent a486d45 commit d2a1cbe

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Doc/c-api/float.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ Floating-Point Objects
9999
the C11 standard ``<math.h>`` header.
100100
101101
102+
.. c:macro:: Py_HUGE_VAL
103+
104+
Same as :c:macro:`Py_INFINITY`.
105+
106+
.. deprecated:: 3.14
107+
The macro is soft deprecated.
108+
109+
102110
.. c:macro:: Py_MATH_E
103111
104112
The definition (accurate for a :c:expr:`double` type) of the :data:`math.e` constant.
@@ -147,6 +155,32 @@ Floating-Point Objects
147155
return PyFloat_FromDouble(copysign(INFINITY, sign));
148156
149157
158+
.. c:macro:: Py_IS_FINITE
159+
160+
Determines if the given floating-point number has finite value i.e. it is
161+
normal, subnormal or zero, but not infinite or NaN.
162+
163+
.. deprecated:: 3.14
164+
The macro is soft deprecated. Use :c:macro:`!isfinite` instead.
165+
166+
167+
.. c:macro:: Py_IS_INFINITE
168+
169+
Determines if the given floating-point number arg is positive or negative
170+
infinity.
171+
172+
.. deprecated:: 3.14
173+
The macro is soft deprecated. Use :c:macro:`!isinf` instead.
174+
175+
176+
.. c:macro:: Py_IS_NAN
177+
178+
Determines if the given floating-point number is a not-a-number (NaN) value.
179+
180+
.. deprecated:: 3.14
181+
The macro is soft deprecated. Use :c:macro:`!isnan` instead.
182+
183+
150184
Pack and Unpack functions
151185
-------------------------
152186

0 commit comments

Comments
 (0)