#19649: pari polroots throws exception
--------------------------+--------------------------------------------
Reporter: kedlaya | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: interfaces | Keywords: pari, polynomials, roots
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
--------------------------+--------------------------------------------
We've seen weird issues with pari.polroots before (e.g., #2418); this may
be related. (Observed in Sage 6.9, on multiple platforms.)
{{{
sage: polRing.<x> = PolynomialRing(ZZ)
sage: j = (x+1)^2 * (x-1)^7 * (x^2-x+1)^5
sage: l = j.roots(CC)
---------------------------------------------------------------------------
SignalError Traceback (most recent call
last)
<ipython-input-106-2450a50ef70a> in <module>()
----> 1 l = j.roots(CC)
/home/kedlaya/sage-
complete/src/sage/rings/polynomial/polynomial_element.pyx in
sage.rings.polynomial.polynomial_element.Polynomial.roots
(/home/kedlaya/Downloads/sage-6.9/src/build/cythonized/sage/rings/polynomial/polynomial_element.c:53329)()
6344 real_field = RealField(L.prec())
6345
-> 6346 return self.change_ring(real_field).roots(ring=L,
multiplicities=multiplicities, algorithm=algorithm)
6347 elif is_pAdicRing(L) or is_pAdicField(L):
6348 p = L.prime()
/home/kedlaya/sage-
complete/src/sage/rings/polynomial/polynomial_element.pyx in
sage.rings.polynomial.polynomial_element.Polynomial.roots
(/home/kedlaya/Downloads/sage-6.9/src/build/cythonized/sage/rings/polynomial/polynomial_element.c:50813)()
6251 if not input_arbprec:
6252 self = self.change_ring(CC if input_complex
else RR)
-> 6253 ext_rts = pari(self.monic()).polroots(precision =
L.prec())
6254
6255 if output_complex:
/home/kedlaya/sage-complete/src/sage/libs/pari/gen.pyx in
sage.libs.pari.gen.gen.polroots
(/home/kedlaya/Downloads/sage-6.9/src/build/cythonized/sage/libs/pari/gen.c:133557)()
8236 from sage.misc.superseded import deprecation
8237 deprecation(16997, 'The flag argument to polroots() is
deprecated and not used anymore')
-> 8238 pari_catch_sig_on()
8239 return P.new_gen(cleanroots(self.g,
prec_bits_to_words(precision)))
8240
/home/kedlaya/sage-complete/src/sage/ext/interrupt/interrupt.pyx in
sage.ext.interrupt.interrupt.sig_raise_exception
(/home/kedlaya/Downloads/sage-6.9/src/build/cythonized/sage/ext/interrupt/interrupt.c:1356)()
108 if msg == NULL:
109 msg = "Segmentation fault"
--> 110 raise SignalError(msg)
111
112 raise SystemError("unknown signal number %s"%sig)
SignalError: Segmentation fault
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19649>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.