On Tue, Feb 15, 2011 at 4:59 PM, Simon King <simon.k...@uni-jena.de> wrote: > No, I was mistaken. Everything can be traced back to g_gcd, which is > called in sage.symbolic.expression.Expression.gcd. At that point, I > lost track: I can not find the code of g_gcd (even "grep g_gcd" does > not give me a hint). In particular, I did not change g_gcd, but it > seems that my patch had a side effect on it.
g_gcd just calls "gcd" in the GiNaC library. You can find the reference to it in sage/libs/ginac/decl.pxi. That function will in turn use the py_gcd function in pynac.pyx for Sage types that it does not know natively. Suppose we have sage: var('x,y') (x, y) sage: g = x^2*4 sage: f = x*y*6 sage: f.gcd(g) 2*x Then, roughly speaking, "g_gcd" will be responsible for figuring out the "x" part of the answer, and "py_gcd" will be called to figure out the 2 part of the answer. --Mike -- 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