math module¶
math_utilities¶
- py_utilities.math.math_utilities.gcd(a, b)[source]¶
Returns the greatest common divisor using Euclid’s algo
>>> gcd(12, 24) 12
>>> gcd(48, 4) 4
>>> gcd(2, 4) 2
>>> gcd(36, 48) 12
Returns the greatest common divisor using Euclid’s algo
>>> gcd(12, 24)
12
>>> gcd(48, 4)
4
>>> gcd(2, 4)
2
>>> gcd(36, 48)
12