Greatest common divisor: Difference between revisions

(→‎{{header|SQL}}: Adds Postgres greatest common divisor function)
Line 1,950:
GCD of 7 and 23 is 1
</pre>
 
Faster iterative solution of Euclid:
<lang lua>function gcd(a,b)
while b~=0 do
a,b=b,a%b
end
return math.abs(a)
end
 
=={{header|Lucid}}==