History of Idiom 74 > diff from v18 to v19
Edit summary for version 19 :
New Java implementation by user [programming-idioms.org]
New Java implementation by user [programming-idioms.org]
↷
Version 18
2016-07-21, 07:19:12
Version 19
2016-12-04, 21:26:44
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.
Imports
import java.math.BigInteger;
Code
BigInteger x = a.gcd(b);