Python‎ > ‎fractions‎ > ‎

fractions.gcd()

http://www.adilwaseem.com/

Definition
Calculate the Greatest Common Divisor of a and b.

Syntax
fractions.gcd(x,y)-> common divisor

Parameters
x,y=number

Examples
The equal to:
 >>> import fractions
>>> fractions.gcd(2,4)
2
>>> fractions.gcd(110,331)
1
>>> fractions.gcd(5,20)
5
>>>
Comments