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
pari polroots gives division by zero sometimes #2418
Comments
comment:1
Actually, this is really just pari giving us an error:
I think that makes this ticket invalid ... Carl, does that seem reasonable to you? In particular, do you have any code you've written that we might fall back on if Pari fails like this? |
comment:2
I certainly don't think the ticket is invalid; it's definitely a bug in Sage (via Pari), even if it's not a bug in the Sage library code. For this example, it presumably works to divide through by the leading coefficient (to get a monic polynomial) before handing off to Pari. Maybe that's a reasonable strategy in general? Or, we could just report it as a bug to Pari upstream, and hope they fix it. |
comment:3
I've followed Carl's suggestion -- see the attached patch. |
Author: Alex Ghitza |
Attachment: trac_2418.patch.gz |
comment:4
Positive review. The patch applies to 4.3 and all tests in rings/polynomial pass. |
Reviewer: John Cremona |
comment:5
|
comment:6
Robert, The merging failure is due to the fact that this patch touches the same code as #6237, which just got merged (thank you!). It is a trivial rebase job, and I am attaching the rebased version. I kept the old version around so you can see that no other changes were made. I'm not sure what the protocol is here. I'd normally go from needs_work to needs_review, but this doesn't really need review... |
rebased on 4.3.1.alpha1 and #6237, apply instead of the previous patch |
comment:7
Attachment: trac_2418-rebased.patch.gz I checked that this applies fine on top of 4.3.1.alpha1 + #6237, and tests pass, so positive review. |
Merged: sage-4.3.1.rc0 |
I think the problem may be in how Sage calls polroots; in particular, I'm suspicious of the coercion from CC to pari.
Component: interfaces
Author: Alex Ghitza
Reviewer: John Cremona
Merged: sage-4.3.1.rc0
Issue created by migration from https://trac.sagemath.org/ticket/2418
The text was updated successfully, but these errors were encountered: