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
Fixes and improvements to EuclideanRings.ParentMethods._test_quo_rem and quo_rem for fields #19939
Comments
Reviewer: Samuel Lelièvre |
Author: Nicolas M. Thiéry |
Commit: |
Dependencies: #19937 |
comment:4
Trivial comment, but why not replace
by
If this works, this will be the fastest way. |
comment:5
I indered pondered about this. I went for using By the way: I looked at the current tests failure. They are due to the
I am going to handle this right now by:
|
comment:6
Replying to @nthiery:
I don't have a strong opinion. When choosing between different equivalent options like this, I would choose depending on efficiency and you cannot beat |
comment:7
Do you see any situation where this method could be time critical, or should I just remove |
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
Replying to @jdemeyer:
Thinking twice about it: this Changing all Thanks for your feedback though! |
comment:13
Polishing. Jeroen, I'll let you give positive review if you're satisfied. |
Changed reviewer from Samuel Lelièvre to Jeroen Demeyer, Samuel Lelièvre |
This comment has been minimized.
This comment has been minimized.
Changed reviewer from Jeroen Demeyer, Samuel Lelièvre to Samuel Lelièvre |
New commits:
|
not r.is_zero()
rather than r!=0
comment:21
Hi Jeroen, The patchbot is now ok. Could you confirm that you are ok with how your comments have been taken care of, and if yes set a positive review? Thanks! New commits:
|
comment:22
I don't like this:
You should use coercion instead. |
comment:23
But really, you don't even need coercion. You can just compute |
comment:24
The question is: what should be the parent of the zero remainder? |
comment:25
I think that the parent of the remainder should be equal to the parent of the quotient. So I propose something like
|
comment:26
+1! |
comment:27
Maybe it's safer to do
since we're not guaranteed that the quotient is a Sage |
Changed reviewer from Samuel Lelièvre to Jeroen Demeyer, Samuel Lelièvre |
comment:30
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:31
Setting a new milestone for this ticket based on a cursory review. |
This ticket:
Fixes
EuclideanRings.ParentMethods._test_quo_rem
to use annot is_zero
instead of!=0
. This is more consistent and does notrequire coercion.
Improves
EuclideanRings.ParentMethods._test_quo_rem
to check thatthe results are in the same parent
Fixes
quo_rem
for fields to return the zero of the field instead of 0Makes the two implementations
FieldElement.quo_rem
andFields.ElementMethods.quo_rem
consistent and reference each other.Depends on #19937
CC: @slel @videlec
Component: categories
Keywords: days70.5
Author: Nicolas M. Thiéry
Branch/Commit: u/nthiery/fix_euclideanrings_parentmethods__test_quo_rem_to_use__not_r_is_zero____rather_than__r__0_ @
eda4420
Reviewer: Jeroen Demeyer, Samuel Lelièvre
Issue created by migration from https://trac.sagemath.org/ticket/19939
The text was updated successfully, but these errors were encountered: