bpo-29956: Improve the math.exp() related documentation.#1073
Conversation
|
@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mdickinson, @birkenfeld and @tiran to be potential reviewers. |
| 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 |
There was a problem hiding this comment.
Strictly speaking, these should probably be 𝜋 (U+1D70B) rather than *π*, and similarly 𝑒 (U+1D452) rather than *e*. But those characters are outside the BMP, and I'm not sure what browser support is like.
| .. function:: expm1(x) | ||
|
|
||
| Return ``e**x - 1``. For small floats *x*, the subtraction in ``exp(x) - 1`` | ||
| Return *e* raised to the power *x* minus 1, where *e* is the base of natural |
There was a problem hiding this comment.
This is ambiguous: it could be read as "e raised to the power (x minus 1)". I think an extra comma would remove the ambiguity: "Return e raised to the power x, minus 1. Here e is the base ..."
mdickinson
left a comment
There was a problem hiding this comment.
LGTM, apart from the ambiguity in the wording for expm1.
|
LGTM |
No description provided.