```{index} single: bgcd; Math::GMP function ``` ```{index} single: Math::GMP::bgcd; Perl function ``` # bgcd Return the greatest common divisor of `$m` and `$n`. ## Synopsis ```perl my $x = Math::GMP->new(6); print $x->bgcd(4); # 2 ``` Also registered as `gcd`. Result is always non-negative; `bgcd(0, 0)` is `0`.