Skip to content

bpo-29956: Improve the math.exp() related documentation.#1073

Merged
serhiy-storchaka merged 2 commits into
python:masterfrom
serhiy-storchaka:math-e-docs
May 4, 2017
Merged

bpo-29956: Improve the math.exp() related documentation.#1073
serhiy-storchaka merged 2 commits into
python:masterfrom
serhiy-storchaka:math-e-docs

Conversation

@serhiy-storchaka
Copy link
Copy Markdown
Member

No description provided.

@serhiy-storchaka serhiy-storchaka added the docs Documentation in the Doc dir label Apr 10, 2017
@mention-bot
Copy link
Copy Markdown

@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.

Comment thread Doc/library/cmath.rst
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
Copy link
Copy Markdown
Member

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.

Comment thread 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
Copy link
Copy Markdown
Member

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 ..."

Copy link
Copy Markdown
Member

@mdickinson mdickinson left a 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.

@serhiy-storchaka serhiy-storchaka merged commit dbaf746 into python:master May 4, 2017
@serhiy-storchaka serhiy-storchaka deleted the math-e-docs branch May 4, 2017 09:25
@mdickinson
Copy link
Copy Markdown
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants