-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-29956: Improve the math.exp() related documentation. #1073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Doc/library/math.rst
Outdated
| .. 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, apart from the ambiguity in the wording for expm1.
|
LGTM |
No description provided.