-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Conversation
…ython into fix-isclose-docs
Co-authored-by: Sergey B Kirpichev <[email protected]>
CC @terryjreedy |
Co-authored-by: Carol Willing <[email protected]>
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.
Thanks @Xiaokang2022 for the PR and folks for reviews.
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.
I would like 3 changes.
- 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.
- 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.
- Further revise the abs_tol entry as suggested below in my comment.
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 |
Co-authored-by: Terry Jan Reedy <[email protected]>
@terryjreedy, I have made the requested changes; please review again. |
Thanks for making the requested changes! @willingc, @terryjreedy: please review the changes made to this pull request. |
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.
Great improvements over the original. Thanks @terryjreedy for the additional content.
Thanks @Xiaokang2022 for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…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]>
…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]>
GH-126380 is a backport of this pull request to the 3.13 branch. |
GH-126381 is a backport of this pull request to the 3.12 branch. |
…#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]>
…#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]>
math.isclose
can be somewhat misleading #126165📚 Documentation preview 📚: https://cpython-previews--126215.org.readthedocs.build/