#16165: old pari triggers segfault in Expression.roots(rings=CC)
-------------------------------------+-------------------------------------
Reporter: rws | Owner:
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-pending
Component: interfaces | Resolution:
Keywords: pari, roots | Merged in:
Authors: Ralf Stephan | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/rws/segfault_in_expression_roots_rings_cc_|
5ae104354f3375f1fbc7076252c0d30282a68952
Dependencies: #15767 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by pbruin):
That is interesting; I can reproduce this in Sage, but it doesn't happen
when trying it directly in GP:
{{{
sage -gp
...
(18:33) gp > f=(1+x+x^2)^3
%1 = x^6 + 3*x^5 + 6*x^4 + 7*x^3 + 6*x^2 + 3*x + 1
(18:33) gp > polroots(f)
%2 = [-0.50000000000000000000000000000000000000 -
0.86602540378443864676372317075293618348*I,
-0.50000000000000000000000000000000000000 +
0.86602540378443864676372317075293618348*I,
-0.50000000000000000000000000000000000000 -
0.86602540378443864676372317075293618348*I,
-0.50000000000000000000000000000000000000 +
0.86602540378443864676372317075293618348*I,
-0.50000000000000000000000000000000000000 -
0.86602540378443864676372317075293618348*I,
-0.50000000000000000000000000000000000000 +
0.86602540378443864676372317075293618348*I]~
}}}
First multiplying `f` by `1.0 + 0.0*I` makes no difference. The Sage ->
PARI conversion isn't the problem either:
{{{
sage: f=(1+x+x^2)^3
sage: pari(f).polroots()
[-0.500000000000000 - 0.866025403784439*I, -0.500000000000000 +
0.866025403784439*I, -0.500000000000000 - 0.866025403784439*I,
-0.500000000000000 + 0.866025403784439*I, -0.500000000000000 -
0.866025403784439*I, -0.500000000000000 + 0.866025403784439*I]~
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/16165#comment:4>
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.