Subroutine GCDN, Algorithm 386 as described in [1, 2], computes the greatest common divisor, IGCD, of n integers A(1), … , A(n) by using the Euclidean algorithm to compute first gcd(A(1), A(2)), then gcd(gcd(A(1), A(2)), A(3)), etc. It also computes integer multipliers Z(1), … , Z(n) such that IGCD = ∑ni=1 A(i)Z(i).
The Latest from CACM
Shape the Future of Computing
ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.
Get InvolvedCommunications of the ACM (CACM) is now a fully Open Access publication.
By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.
Learn More
Join the Discussion (0)
Become a Member or Sign In to Post a Comment