diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-05-04 12:25:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-04 12:25:09 +0300 |
commit | dbaf746b6de0ee431c809d3175ab40ccc18898a8 (patch) | |
tree | a7a07d3e2bde0a326e2c5fba7c2fce4396bdb1cd /Doc/library/cmath.rst | |
parent | 7e4db2f253c555568d56177c2fd083bcf8f88d34 (diff) | |
download | cpython-git-dbaf746b6de0ee431c809d3175ab40ccc18898a8.tar.gz |
bpo-29956: Improve the math.exp() related documentation. (#1073)
Diffstat (limited to 'Doc/library/cmath.rst')
-rw-r--r-- | Doc/library/cmath.rst | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Doc/library/cmath.rst b/Doc/library/cmath.rst index c819a667ec..9d81730f20 100644 --- a/Doc/library/cmath.rst +++ b/Doc/library/cmath.rst @@ -47,7 +47,7 @@ rectangular coordinates to polar coordinates and back. Return the phase of *x* (also known as the *argument* of *x*), as a float. ``phase(x)`` is equivalent to ``math.atan2(x.imag, - x.real)``. The result lies in the range [-π, π], and the branch + x.real)``. The result lies in the range [-\ *π*, *π*], and the branch cut for this operation lies along the negative real axis, continuous from above. On systems with support for signed zeros (which includes most systems in current use), this means that the @@ -86,7 +86,8 @@ Power and logarithmic functions .. function:: exp(x) - Return the exponential value ``e**x``. + Return *e* raised to the power *x*, where *e* is the base of natural + logarithms. .. function:: log(x[, base]) @@ -243,7 +244,6 @@ Classification functions Constants --------- - .. data:: pi The mathematical constant *π*, as a float. @@ -253,18 +253,21 @@ Constants The mathematical constant *e*, as a float. + .. data:: tau The mathematical constant *τ*, as a float. .. versionadded:: 3.6 + .. data:: inf Floating-point positive infinity. Equivalent to ``float('inf')``. .. versionadded:: 3.6 + .. data:: infj Complex number with zero real part and positive infinity imaginary @@ -272,6 +275,7 @@ Constants .. versionadded:: 3.6 + .. data:: nan A floating-point "not a number" (NaN) value. Equivalent to @@ -279,6 +283,7 @@ Constants .. versionadded:: 3.6 + .. data:: nanj Complex number with zero real part and NaN imaginary part. Equivalent to |