Programming-Idioms

History of Idiom 74 > diff from v9 to v10

Edit summary for version 10 :

Version 9

2015-08-25, 21:17:11

Version 10

2015-09-03, 16:30:35

Idiom #74 Compute GCD

Compute the greatest common divisor x of big integers a and b. Use an integer type able to handle huge numbers.

Idiom #74 Compute GCD

Compute the greatest common divisor x of big integers a and b. Use an integer type able to handle huge numbers.

Code
x = a.gcd(b)
Doc URL
http://ruby-doc.org/core-2.2.0/Integer.html#method-i-gcd