Skip to content
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

gh-126165: Improve docs of function math.isclose #126215

Merged
merged 15 commits into from
Nov 4, 2024

Conversation

Xiaokang2022
Copy link
Contributor

@Xiaokang2022 Xiaokang2022 commented Oct 31, 2024

@rruuaanng
Copy link
Contributor

@skirpichev

Doc/library/math.rst Outdated Show resolved Hide resolved
Doc/library/math.rst Outdated Show resolved Hide resolved
skirpichev
skirpichev previously approved these changes Oct 31, 2024
@skirpichev
Copy link
Member

CC @terryjreedy

Doc/library/cmath.rst Outdated Show resolved Hide resolved
Doc/library/math.rst Outdated Show resolved Hide resolved
Doc/library/cmath.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Xiaokang2022 for the PR and folks for reviews.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like 3 changes.

  1. move the result sentence "If no errors occur, ... abs_tol)``." to immediately after the second sentence "Whether ... is determined ... [by] tolerances." The result sentence specifies how the tolerances determine, which is needed to really understand the entries that follow.
  2. At the end of the rel_tol entry, either replace "greater than zero" with "nonnegative" or prefix it with "equal or ". Either way, add "and less than one" at the end. The meaning of the function assumes much less than one.
  3. Further revise the abs_tol entry as suggested below in my comment.

Doc/library/cmath.rst Outdated Show resolved Hide resolved
@bedevere-app
Copy link

bedevere-app bot commented Nov 3, 2024

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@Xiaokang2022
Copy link
Contributor Author

@terryjreedy, I have made the requested changes; please review again.

@bedevere-app
Copy link

bedevere-app bot commented Nov 3, 2024

Thanks for making the requested changes!

@willingc, @terryjreedy: please review the changes made to this pull request.

Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great improvements over the original. Thanks @terryjreedy for the additional content.

@terryjreedy terryjreedy added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Nov 4, 2024
@terryjreedy terryjreedy merged commit 081706f into python:main Nov 4, 2024
34 of 37 checks passed
@miss-islington-app
Copy link

Thanks @Xiaokang2022 for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 4, 2024
…6215)

(cherry picked from commit 081706f)

Co-authored-by: Zhikang Yan <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 4, 2024
…6215)

(cherry picked from commit 081706f)

Co-authored-by: Zhikang Yan <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 4, 2024

GH-126380 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 4, 2024
@bedevere-app
Copy link

bedevere-app bot commented Nov 4, 2024

GH-126381 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Nov 4, 2024
terryjreedy added a commit that referenced this pull request Nov 4, 2024
…#126380)

gh-126165: Improve docs of function `math.isclose` (GH-126215)
(cherry picked from commit 081706f)

Co-authored-by: Zhikang Yan <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
terryjreedy added a commit that referenced this pull request Nov 4, 2024
…#126381)

gh-126165: Improve docs of function `math.isclose` (GH-126215)
(cherry picked from commit 081706f)

Co-authored-by: Zhikang Yan <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Co-authored-by: Carol Willing <[email protected]>
Co-authored-by: Terry Jan Reedy <[email protected]>
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 skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants