On Thu, Feb 10, 2011 at 9:55 AM, William Stein <wst...@gmail.com> wrote:
> [... gcd stuff ...]

It seems like nobody explained how the current gcd definition got
included.  It's from a patch to rational.pyx from Alex Ghitza (who I
cc'd) that did this:

-        d = self.denom()*other.denom()
-        self_d = self.numer()*other.denom()
-        other_d = other.numer()*self.denom()
-        return self_d.gcd(other_d) / d
+        if self == 0 and other == 0:
+            return Rational(0)
+        else:
+            return Rational(1)


This was from  trac 3214 "uniformise the behaviour of gcd for rational numbers":

     http://trac.sagemath.org/sage_trac/ticket/3214

which was reported by Andrey Novoseltsev.

So if Andrey or Alex cared so much, they may want to pipe up.

This thread is at least:

   
http://groups.google.com/group/sage-devel/browse_thread/thread/cd05585cf395b3a0/160c549d6bdc8867#160c549d6bdc8867

William

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to