Description Usage Arguments Value References Examples
The Euclidean division implementation of the greatest common divisor algorithm computes a quotient q_k and a remainder r_k at each step k from the two numbers a and b. The quotient component of Euclidean division is not used in the algorithm, thus only modulo operations are required as that only returns the remainder.
1 | gcd_division(a, b)
|
a |
First integer |
b |
Second integer |
The greatest common divisor
Cormen, T., Leiserson, C., Rivest, R., & Stein, C. (2009). Introduction to algorithms (3rd ed., pp. 928-930). Cambridge (Inglaterra): Mit Press. Euclidean algorithm. (2017, May 18). In Wikipedia, The Free Encyclopedia. From https://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&oldid=780973502 Euclidean division. (2017, May 10). In Wikipedia, The Free Encyclopedia. From https://en.wikipedia.org/w/index.php?title=Euclidean_division&oldid=779699188
1 2 | gcd_division(30, 15)
gcd_division(24, 8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.