X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fbigrat.pl;h=2d3738f805b9ac7b596a7fa1e83d87ef11bc1080;hb=a26136ef4f31e2fb1d3630b5c3f021c56c89644b;hp=5bd127a9aec15e57cdf28e45fb9e434983ae5757;hpb=79072805bf63abe5b5978b5928ab00d360ea3e7f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/bigrat.pl b/lib/bigrat.pl index 5bd127a..2d3738f 100644 --- a/lib/bigrat.pl +++ b/lib/bigrat.pl @@ -1,6 +1,12 @@ package bigrat; require "bigint.pl"; - +# +# This library is no longer being maintained, and is included for backward +# compatibility with Perl 4 programs which may require it. +# +# In particular, this should not be used as an example of modern Perl +# programming techniques. +# # Arbitrary size rational math package # # by Mark Biggar @@ -55,6 +61,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);