Thanks.
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy.
For more options, visit https://groups.google.com/groups/opt_out.
Hi,
I implemented the extended_euclid() in Diophantine module without knowing that
gcdex() existed. However, Chris pointed out that extended_euclid() is much faster.
Take a look at here. He suggested to rename extended_euclid() to igcdex().
I also feel that when we are dealing with integers, i.e when using igcd() we should
allow inputting more than two numbers at a time. It doesn't break the API, does it?
Regards,
Thilina
Hi,
I implemented the
extended_euclid()in Diophantine module without knowing that
gcdex()existed. However, Chris pointed out that extended_euclid() is much faster.
Take a look at here. He suggested to renameextended_euclid()toigcdex().I also feel that when we are dealing with integers, i.e when using
igcd()we should
allow inputting more than two numbers at a time. It doesn't break the API, does it?
Hi,
I implemented the
extended_euclid()in Diophantine module without knowing that
gcdex()existed. However, Chris pointed out that extended_euclid() is much faster.
Take a look at here. He suggested to renameextended_euclid()toigcdex().
Hello,gcd(a ; b ; c) = gcd(a ; gcd(b ; c)) = gcd(gcd(a ; b) ; c)).The best ways to compute gcd(a ; b ; c ; d ; e ; ...) should be to first sort the arguments. If we suppose that a <= b <= c <= d <= e <= ... . Let L be this list of integers. Then you can apply the following steps.1) Compute g = gcd(L[0] ; L[1]). If the result is 1 then nothing else has to be done.2) If L is empty, g is the gcd, else remove L[0] and L[1] and go to 1).
Hi,
On 11 July 2013 11:14, Thilina Rathnayake <thilin...@gmail.com> wrote:
Hi,
I implemented the
extended_euclid()in Diophantine module without knowing that
gcdex()existed. However, Chris pointed out that extended_euclid() is much faster.
Take a look at here. He suggested to renameextended_euclid()toigcdex().btw. Even if you don't know if a function exists or if it exists what is it's name, it's not that hard learn it. For example, the following simple query (could be extended to give broader results, if necessary) with git grep gives quite a lot of results:$ git grep -i "extended\s\+euclid"sympy/integrals/risch.py: Extended Euclidean Algorithm, Diophantine version.sympy/integrals/risch.py: # Extended Euclidean Algorithm (Diophantine Version) pg. 13