Uh oh!
There was an error while loading. Please reload this page.
gh-126165: Improve docs of function math.isclose - #126215
Conversation
rruuaanng
commented
Oct 31, 2024
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
skirpichev
commented
Oct 31, 2024
CC @terryjreedy |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
willingc
left a comment
There was a problem hiding this comment.
Thanks @Xiaokang2022 for the PR and folks for reviews.
terryjreedy
left a comment
There was a problem hiding this comment.
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.
Uh oh!
There was an error while loading. Please reload this page.
Xiaokang2022
commented
Nov 3, 2024
@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. |
willingc
left a comment
There was a problem hiding this comment.
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.isclosecan be somewhat misleading #126165📚 Documentation preview 📚: https://cpython-previews--126215.org.readthedocs.build/