Jump to content

Greatest common divisor: Difference between revisions

(Added Bracmat)
Line 1,008:
if(a > b) return gcd(b, a % b);
return gcd(a, b % a);
}</lang>
===Built-in===
<lang java>import java.math.BigInteger;
 
public static long gcd(long a, long b){
return BigInteger.valueOf(a).gcd(BigInteger.valueOf(b)).longValue();
}</lang>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.