mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #9165: Add math.isfinite and cmath.isfinite.
This commit is contained in:
parent
3e7428995f
commit
8e0c996873
7 changed files with 61 additions and 0 deletions
|
@ -97,6 +97,12 @@ Number-theoretic and representation functions
|
|||
<http://code.activestate.com/recipes/393090/>`_\.
|
||||
|
||||
|
||||
.. function:: isfinite(x)
|
||||
|
||||
Return ``True`` if *x* is neither an infinity nor a NaN, and
|
||||
``False`` otherwise. (Note that ``0.0`` *is* considered finite.)
|
||||
|
||||
|
||||
.. function:: isinf(x)
|
||||
|
||||
Check if the float *x* is positive or negative infinity.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue