int.gcd(int2) â integer
Instance Public methods
Returns the greatest common divisor (always positive). 0.gcd(x) and x.gcd(0) return abs(x).
1 2 3 | 2 .gcd( 2 ) #=> 2 3 .gcd(- 7 ) #=> 1 (( 1 << 31 )- 1 ).gcd(( 1 << 61 )- 1 ) #=> 1 |
Please login to continue.