diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2015-01-11 11:55:29 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2015-01-11 11:55:29 (GMT) |
commit | a5d0c7c2fdd638d684acdb5391e0987b1e37f56a (patch) | |
tree | 90debcd5a43e635d8a0dda8cb69533588c6c513e /Doc | |
parent | 845b14cc8ef2d95e72c97a788a1ffb31faeaa3a8 (diff) | |
download | cpython-a5d0c7c2fdd638d684acdb5391e0987b1e37f56a.zip cpython-a5d0c7c2fdd638d684acdb5391e0987b1e37f56a.tar.gz cpython-a5d0c7c2fdd638d684acdb5391e0987b1e37f56a.tar.bz2 |
Issue #23185: add math.inf and math.nan constants.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/math.rst | 16 | ||||
-rw-r--r-- | Doc/whatsnew/3.5.rst | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 3c41672..eda0056 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -383,6 +383,22 @@ Constants The mathematical constant e = 2.718281..., to available precision. +.. data:: inf + + A floating-point positive infinity. (For negative infinity, use + ``-math.inf``.) Equivalent to the output of ``float('inf')``. + + .. versionadded:: 3.5 + + +.. data:: nan + + A floating-point "not a number" (NaN) value. Equivalent to the output of + ``float('nan')``. + + .. versionadded:: 3.5 + + .. impl-detail:: The :mod:`math` module consists mostly of thin wrappers around the platform C diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index f3cc514..bea6a8a 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -243,6 +243,12 @@ re * Now unmatched groups are replaced with empty strings in :func:`re.sub` and :func:`re.subn`. (Contributed by Serhiy Storchaka in :issue:`1519638`.) +math +---- + +* :data:`math.inf` and :data:`math.nan` constants added. (Contributed by Mark + Dickinson in :issue:`23185`.) + shutil ------ |