Dear Mike and kcrisman,

Thank you for providing me with some pointers!

On 15 Feb., 17:29, kcrisman <kcris...@gmail.com> wrote:
> ...
> So it is using the Ginac gcd, and calling it 'g_gcd'.  And all of that
> is in a call
>
> cdef extern from "ginac_wrap.h":
>
> which lives in devel/sage/c_lib/include.    I understand nearly
> nothing about headers, but I think that
>
>     py_funcs_struct py_funcs "GiNaC::py_funcs"
>
> means that py_gcd is going to be under this.  Notice that Pynac
> headers live in $SAGE_ROOT/local/include/pynac.

In other words:
* sage.rings.arith.gcd(a,b) calls a.gcd(b)
* a.gcd(b) calls g_gcd(a._gobj,b._gobj).
* g_gcd calls py_gcd for the objects that are underlying a and b; call
these objects A and B
* py_gcd(A,B) returns sage.rings.arith.gcd(A,B).

Since (probably) A is an integer and B is rational, it is indeed a
case that has changed with my patch.

However, I can not understand yet why the minus sign is not pulled out
of (-sqrt(2)-1/5*I)^2. Neither do I understand why (1/
sqrt(2*pi*1^2)*exp(-1/(2*1^2)*(x-0)^2) - 1/sqrt(2*pi*n(1)^2)*exp(-1/
(2*n(1)^2)*(x-n(0))^2))^2 segfaults.

> I don't know if we want to modify Ginac to change this, though.

I think a segfault caused by a different choice of a gcd is nasty and
probably a bug. But I guess Ginac is beyond my understanding.

Best regards,
Simon

-- 
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