#17671: Implement xgcd for fraction fields
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.5
      Component:  basic arithmetic   |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/17671                 |  d8a03d7fa1dd0e401adbae8e2a16ccbfb1902392
   Dependencies:  #17673             |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by bruno):

 In `src/sage/categories/quotient_fields.py`, lines 262-270:
 {{{#!python
             except (AttributeError, NotImplementedError, TypeError,
 ValueError):
                 zero = self.parent.zero()
                 one  = self.parent.one()
                 if self == zero:
                     return (other, zero, one)
                 elif other == zero:
                     return (self, one, zero)
                 else:
                     return (zero, zero, zero)
 }}}

 I would have returned `one` as soon as one of `self` and `other` is
 nonzero, and `zero` only when none is nonzero. The current code is not
 consistent (if I am not mistaken) with the implementation of `gcd` (lines
 125-128).

--
Ticket URL: <http://trac.sagemath.org/ticket/17671#comment:6>
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