Go to the first, previous, next, last section, table of contents.


igcd,igcdcntl

igcd(i1,i2)
:: The integer greatest common divisor of i1 and i2.
igcdcntl([i])
:: Selects an algorithm for integer GCD.
return
integer
i1,i2,i
integer
[0] A=lrandom(10^4)$
[1] B=lrandom(10^4)$
[2] C=lrandom(10^4)$
[3] D=A*C$
[4] E=A*B$
[5] cputime(1)$
[6] igcd(D,E)$
0.6sec + gc : 1.93sec(2.531sec)
[7] igcdcntl(1)$
[8] igcd(D,E)$  
0.27sec(0.2635sec)
[9] igcdcntl(2)$
[10] igcd(D,E)$  
0.19sec(0.1928sec)
[11] igcdcntl(3)$
[12] igcd(D,E)$  
0.08sec(0.08023sec)
References
section gcd, gcdz.


Go to the first, previous, next, last section, table of contents.