diff options
Diffstat (limited to 'lib/bigrat.pl')
-rw-r--r-- | lib/bigrat.pl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/bigrat.pl b/lib/bigrat.pl index 5bd127a9ae..fb436ce570 100644 --- a/lib/bigrat.pl +++ b/lib/bigrat.pl @@ -55,6 +55,7 @@ sub norm { #(bint, bint) return rat_num 'NaN'; } else { local($gcd) = &'bgcd($num,$dom); + $gcd =~ s/^-/+/; if ($gcd ne '+1') { $num = &'bdiv($num,$gcd); $dom = &'bdiv($dom,$gcd); |