gcd(p1)
public
Returns the greatest common divisor (always positive). 0.gcd(x) and x.gcd(0) return abs(x).
For example:
2.gcd(2)
3.gcd(-7)
((1<<31)-1).gcd((1<<61)-1)
Show source
VALUE
rb_gcd(VALUE self, VALUE other)
{
other = nurat_int_value(other);
return f_gcd(self, other);
}