#19676: Bug in Polynomial_element_generic_sparse.gcd
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  defect             |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.10
      Component:  basic arithmetic   |   Resolution:
       Keywords:  polynomial, gcd    |    Merged in:
        Authors:  Bruno Grenet       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/bruno/gcd_polynomial_element_generic|  
4bc193fb053214137e5fb4af72dbdac2bac804ea
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by lftabera):

 * status:  needs_review => needs_info


Comment:

 why not use the coercion decorator?

 {{{
 @coerce_binop
 def gcd
 }}}

 With that change:

 {{{
 sage: R.<x> = PolynomialRing(ZZ,sparse=True)
 sage: S.<y> = R[]
 sage: x.gcd(y)
 1
 sage: _.parent() is S
 True
 sage: (6*x).gcd(9)
 3
 sage: _.parent() is R
 True
 }}}

 Is there any reason I am unaware to perform manually the coercion?

--
Ticket URL: <http://trac.sagemath.org/ticket/19676#comment:3>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to