diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-07-11 17:38:24 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-07-11 17:38:24 (GMT) |
commit | 8e0c9968731ac7f1d94bddff348544c70833b52b (patch) | |
tree | af0d4866d6dbae9e9b9003435956c6f2f7141dea /Doc | |
parent | 3e7428995f9d09493640326104c70a26c7cdab07 (diff) | |
download | cpython-8e0c9968731ac7f1d94bddff348544c70833b52b.zip cpython-8e0c9968731ac7f1d94bddff348544c70833b52b.tar.gz cpython-8e0c9968731ac7f1d94bddff348544c70833b52b.tar.bz2 |
Issue #9165: Add math.isfinite and cmath.isfinite.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/cmath.rst | 6 | ||||
-rw-r--r-- | Doc/library/math.rst | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst index 14b909b..ae94039 100644 --- a/Doc/library/cmath.rst +++ b/Doc/library/cmath.rst @@ -187,6 +187,12 @@ Hyperbolic functions Classification functions ------------------------ +.. function:: isfinite(x) + + Return ``True`` if both the real and imaginary parts of *x* are finite, + and ``False`` otherwise. + + .. function:: isinf(x) Return *True* if the real or the imaginary part of x is positive diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 9c3bd03..22f6f5f 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -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. |