#3214: [with patch, with positive review apart from one point] gcd needs 
improved
coercion
------------------------------+---------------------------------------------
 Reporter:  novoselt          |        Owner:  somebody
     Type:  defect            |       Status:  reopened
 Priority:  blocker           |    Milestone:  sage-3.3
Component:  basic arithmetic  |   Resolution:          
 Keywords:                    |  
------------------------------+---------------------------------------------
Changes (by cremona):

  * summary:  [with patch, needs review] gcd needs improved coercion =>
              [with patch, with positive review apart from
              one point] gcd needs improved coercion

Comment:

 I applied the patch successfully to 3.2.3.   Alex has done a good job of
 testing -- I did not do a testall, just tested all in sage/rings.

 It took me a few seconds (well, minutes) to see that gcd(nums)/lcm(denoms)
 was the right answer.  nice!

 I found it hard to use the content function though.  None of these work if
 L is a list of integers or rationals:  L.content(), content(L),
 QQ.content(L), ZZ.content(L).  Can we not have these?  Also if v is an
 element of {{{ZZ^n}}} then v.content() would also be useful.  I could
 perhaps be persuaded to put these enhancements into a different ticket.

 I don't know what to do about the ginac failure:
 {{{
 sage: var('x,y',ns=1)
 (x, y)
 sage: f = -289*x*y - 17*x^2*y + 3/7*x^5*y + x^7 + 17*x^6 + 2/3*x^2 -
 51/7*y^2 + 34/3*x + 2/7*y
 sage: g = -289*x*y + 3/7*x^5*y - 17*x^13*y + x^18 + 2/3*x^13 + 17*x^6 -
 51/7*y^2 + 34/3*x + 2/7*y
 sage: f.gcd(g)
 <boom>
 }}}
 It fails trying to convert a non-integral rational to an integer.  Simpler
 polys in place of f anf g work fine.  As I don't even know what ginac is
 or does I'm stuck!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/3214#comment:13>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to