Issue #9165: Add math.isfinite and cmath.isfinite.

This commit is contained in:
Mark Dickinson 2010-07-11 17:38:24 +00:00
parent 3e7428995f
commit 8e0c996873
7 changed files with 61 additions and 0 deletions

View file

@ -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.