Number-Theoretic Algorithm - gcd

Euclid’s algorithm

Euclid’s algorithm for efficiently computing the greatest common divisor of two integers.

PseudoCode:

Eucilid(a, b)
	if b == 0
		return a
	else return Eucilid(b, a mod b)
}

   Reprint policy


《Number-Theoretic Algorithm - gcd》 by Tong Shi is licensed under a Creative Commons Attribution 4.0 International License
  TOC