-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
Documentation improvements for rounding methods #35431
Conversation
While doing these changes I observed that the tie-breaking convention in RR (inherited from mpfr_round) and that in RDF (inherited from python3's round) do not coincide: is this not an issue ? |
No, it is not an issue. There is no expectation that they should be the same. Also, in your changes, it should be |
This PR: I have just checked the changes made. They seem correct to me (up to changing into
Consistency between RR and RDF Looking at the mpfr documentation, I see that making RR and RDF consistent on this rounding convention would be extremely easy: it would suffice to call |
@vneiger In some ways, I am actually arguing the opposite: The user should not expect any consistency as the fundamental underlying data types are completely different. As far as changing the rounding mode, while seeming somewhat innocuous, it feels like a very significant change to a core part to me. As such, it must be discussed on sage-devel before such a change is done (and I fail to see any benefit to possibly breaking sensitive code in the wild as per the above). |
@tscrim Ok, noted, thanks for your clarifications. I was placing myself as a user who ignores this technical difference, but I am realizing only now that making doc/coding choices under this assumption is a bad idea. So, ok for accepting the inconsistency, and then I agree that changing RR's |
I don’t think that is an unreasonable viewpoint to take, but anyone who cares enough to do that kind of comparison can almost certainly understand the difference between However, it wouldn’t be a bad thing to include an option to choose the type of rounding, but it might not be worth the hassle… |
Looks good to me. @tscrim are you able to launch the workflows (which I suppose are necessary before merging)? |
@marizee I have a few doc formatting things that need to be addressed before a positive review. |
@tscrim We are using the default GH setting here, "Require approval for first-time contributors" (see https://docs.github.com/en/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks#about-workflow-runs-from-public-forks) |
Documentation preview for this PR is ready! 🎉 |
@mkoeppe Okay, thanks. |
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.com>
Co-authored-by: Travis Scrimshaw <clfrngrown@aol.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.
Thank you.
This has broken the linter, fix up in #35552 |
📚 Description
Fixes a typo in the documentation of `real_arb.pyx`. Improves documentation for the `round` method for the rings `RR` and `RDF`, by specifying explicitly how the ambiguous cases are dealt with.📝 Checklist
⌛ Dependencies
None