[GiNaC-list] code: extended gcd
Ralf Stephan
ralf at ark.in-berlin.de
Mon Nov 8 16:21:04 CET 2004
Hello,
> > gcd(a,b) = ca*a + cb*b.
>
> These are not the cofactors (at least, I've never seen the quantities from
> this equation referred to as "cofactors").
Heh. See C. Yap, Algorithmic Algebra, Ch. 2, §2, p. 5 which is online:
http://www.cs.nyu.edu/yap/book/
He agrees with you in that the algorithm to compute them is handled
separately from the treatise of gcd computation. Voilà, extgcd.
Now, we are back at square one where I just sent the xgcd() function
to the list. But it had a bug. If you want to have the corrected version
in GiNaC, I will send it gladly and directly to you.
ralf
More information about the GiNaC-list
mailing list