[algorithm] gcd

the gcd algorithm