mirror of
https://github.com/python/cpython.git
synced 2025-11-18 18:31:56 +00:00
Issue #23185: add math.inf and math.nan constants.
This commit is contained in:
parent
845b14cc8e
commit
a5d0c7c2fd
5 changed files with 69 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue