#18518: Fix Polynomial.denominator() for high-degree polynomials
-----------------------------------+--------------------------------
   Reporter:  bruno                |            Owner:
       Type:  defect               |           Status:  new
   Priority:  major                |        Milestone:  sage-6.8
  Component:  commutative algebra  |         Keywords:  polynomial
  Merged in:                       |          Authors:  Bruno Grenet
  Reviewers:                       |  Report Upstream:  N/A
Work issues:                       |           Branch:
     Commit:                       |     Dependencies:
   Stopgaps:                       |
-----------------------------------+--------------------------------
 Currently, the method `Polynomial.denominator` does not work with very
 high-degree (sparse) polynomial:
 {{{
 sage: R.<x> = PolynomialRing(QQ, sparse=True)
 sage: p = x^(2^100) - 1/2
 sage: p.denominator()
 Traceback (most recent call last):
 ...
 OverflowError: cannot fit 'long' into an index-sized integer
 }}}

 This comes from the method using `self.list()` instead of
 `self.coefficients()`. I correct this and obtain:

 {{{
 sage: R.<x> = PolynomialRing(QQ, sparse=True)
 sage: p = x^(2^100) - 1/2
 sage: p.denominator()
 2
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/18518>
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.

Reply via email to