summaryrefslogtreecommitdiff
path: root/lib/bigrat.pl
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1995-03-12 22:32:14 -0800
committerLarry Wall <lwall@netlabs.com>1995-03-12 22:32:14 -0800
commit748a93069b3d16374a9859d1456065dd3ae11394 (patch)
tree308ca14de9933a313dceacce8be77db67d9368c7 /lib/bigrat.pl
parentfec02dd38faf8f83471b031857d89cb76fea1ca0 (diff)
downloadperl-748a93069b3d16374a9859d1456065dd3ae11394.tar.gz
Perl 5.001perl-5.001
[See the Changes file for a list of changes]
Diffstat (limited to 'lib/bigrat.pl')
-rw-r--r--lib/bigrat.pl1
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);