Module:Rational: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
-- find the gcd of two integers | -- find the gcd of two integers | ||
function gcd(x, y) | function p.gcd(x, y) | ||
if x < y then | if x < y then | ||
x, y = y, x | x, y = y, x |