-
-
Notifications
You must be signed in to change notification settings - Fork 567
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
enumerate_totallyreal_fields bug fix #13101
Comments
comment:1
Attachment: trac_13101_bug_in_enumerate_totallyreal_fields_all.patch.gz Okay, I made a patch with the change you mentioned (I think I figured out what indentation you meant, but double-check to make sure). The output of this command should be the empty array, right? That's what I gather from the data on your website/your paper. (Also, I fixed a typo). |
Changed reviewer from citro to none |
Author: Robert Harron, John Voight |
comment:3
Thanks for doing this and for fixing the typo! Yes, the tabbing/formatting is correct. Am I allowed to review this? JV |
comment:4
Hmm, I don't really know how that works. I mean, if you did, you'd probably want to remove your name from the authors... You could try, what's the worse that could happen?! |
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to sd51 |
Reviewer: Alex Ghitza |
comment:7
The added doctest really takes too long. Can the bug be tested with a shorted test? Otherwise, simply mark the test something like
|
comment:8
Did someone add
to the doctest? This was just an example that caused the stupid bug and I don't think it was ever intended for a doctest. But then we also probably want to keep it for future testing purposes, right? There is an easy doctest in there already
and for general purposes of testing, this should be enough, IMHO. JV |
comment:9
Yeah, I added that doctest: every time there is a bug fix, there has to be a corresponding doctest added to show that the bug has been fixed. Since I'm not really familiar with the workings of this part of sage, I simply took the snippet of code from the bug report and added it as a doctest. What Jeroen is asking is whether there is a shorter test that would fail before this bug fix but pass afterwards, thus showing things were fixed. Can you cook one of those up? Replying to @jvoight:
|
comment:10
OK, got it. Then yes, just use
which should return
as the smallest totally real octic field has discriminant 282300416 > 106. This triggers the error on my unpatched version. Is this quick enough for the doctest? JV |
comment:11
Attachment: trac_13101_review.patch.gz here is a review patch, with more reasonable tests. |
Changed author from Robert Harron, John Voight to Robert Harron, John Voight, Frédéric Chapoton |
Changed reviewer from Alex Ghitza to Alex Ghitza, Peter Bruin |
This comment has been minimized.
This comment has been minimized.
comment:12
Looks good. The new doctest takes around 2 seconds on the AMD64 2.2 GHz system that I tested it on. I think marking this as "long time" is still justified; I'm adding this as a reviewer patch. |
mark doctest as "long time" |
Branch: u/vbraun/enumerate_totallyreal |
Commit: |
comment:13
Attachment: trac_13101_long_time.patch.gz New commits:
|
The fix is easy: we just need to add the lines
before line 295 of sage/rings/number_field/totallyreal_data.pyx. (Yes, I'm still intimidated by creating a patch.)
The issue was that when the lagrange multipliers gives contradictory bounds (a good thing, since it says the enumeration can stop in that branch), it was not sending a pair of bounds, just a single element, causing a type error.
JV
Apply: attachment: trac_13101_bug_in_enumerate_totallyreal_fields_all.patch,
attachment: trac_13101_review.patch,
attachment: trac_13101_long_time.patch,
Component: number fields
Keywords: sd51
Author: Robert Harron, John Voight, Frédéric Chapoton
Branch/Commit: u/vbraun/enumerate_totallyreal @
3923f3a
Reviewer: Alex Ghitza, Peter Bruin
Issue created by migration from https://trac.sagemath.org/ticket/13101
The text was updated successfully, but these errors were encountered: