-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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 <skirpichev@gmail.com>
CC @terryjreedy |
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
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.
@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. |
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 <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>
…#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>
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>
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>
math.isclose
can be somewhat misleading #126165📚 Documentation preview 📚: https://cpython-previews--126215.org.readthedocs.build/