Skip to content

pari polroots gives division by zero sometimes #2418

@sagetrac-cwitty

Description

@sagetrac-cwitty

I think the problem may be in how Sage calls polroots; in particular, I'm suspicious of the coercion from CC to pari.

sage: x = polygen(QQ)
sage: p = (x^50/2^100 + x^10 + x + 1).change_ring(ComplexField(106))
sage: len(p.roots())
50
sage: (p/2^100).roots()
---------------------------------------------------------------------------
<class 'sage.libs.pari.gen.PariError'>    Traceback (most recent call last)

/home/cwitty/my-sage/<ipython console> in <module>()

/home/cwitty/my-sage/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.roots()

/home/cwitty/my-sage/gen.pyx in sage.libs.pari.gen._pari_trap()

<class 'sage.libs.pari.gen.PariError'>: division by zero (46)

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions