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
Xiaokang2022 and others added 3 commits October 31, 2024 13:04
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
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
Xiaokang2022 and others added 2 commits November 3, 2024 00:59
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
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
@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 <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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 <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@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 <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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 <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
@Xiaokang2022 Xiaokang2022 deleted the fix-isclose-docs branch January 6, 2025 04:40
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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