#15790: GCD of sparse univariate polynomials over ZZ
--------------------------------+------------------------------
   Reporter:  bruno             |            Owner:
       Type:  defect            |           Status:  new
   Priority:  minor             |        Milestone:  sage-6.0
  Component:  basic arithmetic  |         Keywords:  GCD sparse
  Merged in:                    |          Authors:
  Reviewers:                    |  Report Upstream:  N/A
Work issues:                    |           Branch:
     Commit:                    |     Dependencies:
   Stopgaps:                    |
--------------------------------+------------------------------
 The GCD of two sparse polynomials over `ZZ` is not computed. If the
 polynomials are in dense representation or if they are in sparse
 representation but defined over `QQ`, there is no problem.

 {{{
 sage: R1.<x>=PolynomialRing(ZZ,'x',sparse=true)
 sage: R2.<x>=PolynomialRing(ZZ,'x',sparse=false)
 sage: R3.<x>=PolynomialRing(QQ,'x',sparse=true)
 sage: p=x^2-3*x+2
 sage: q=x^2-1
 sage: gcd(R2(p),R2(q))
 x - 1
 sage: gcd(R3(p),R3(q))
 x - 1
 sage: gcd(R1(p),R1(q))
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-6-0d7380207fef> in <module>()
 ----> 1 gcd(R1(p),R1(q))

 /home/bgrenet/bin/sage-6.0-x86_64-Linux/local/lib/python2.7/site-
 packages/sage/rings/arith.pyc in gcd(a, b, **kwargs)
    1605                 return ZZ(a).gcd(ZZ(b))
    1606             except TypeError:
 -> 1607                 raise TypeError("unable to find gcd")
    1608         return GCD(b, **kwargs)
    1609

 TypeError: unable to find gcd
 }}}

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

Reply via email to