From a4c42bfb2337d37da89d789cb8cc226367994e32 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 00:15:27 +0000 Subject: perl 5.14.2 from siep git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/bigrat.pm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/bigrat.pm') diff --git a/Master/tlpkg/tlperl/lib/bigrat.pm b/Master/tlpkg/tlperl/lib/bigrat.pm index 10e8057abd0..907c13ceb5d 100644 --- a/Master/tlpkg/tlperl/lib/bigrat.pm +++ b/Master/tlpkg/tlperl/lib/bigrat.pm @@ -1,7 +1,7 @@ package bigrat; use 5.006; -$VERSION = '0.23'; +$VERSION = '0.28'; require Exporter; @ISA = qw( bigint ); @EXPORT_OK = qw( PI e bpi bexp ); @@ -115,7 +115,7 @@ sub import { # this causes upgrading $upgrade = $_[$i+1]; # or undef to disable - my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..." + my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existent..." splice @a, $j, $s; $j -= $s; } elsif ($_[$i] =~ /^(l|lib|try|only)$/) @@ -123,19 +123,19 @@ sub import # this causes a different low lib to take care... $lib_kind = $1; $lib_kind = 'lib' if $lib_kind eq 'l'; $lib = $_[$i+1] || ''; - my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..." + my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existent..." splice @a, $j, $s; $j -= $s; $i++; } elsif ($_[$i] =~ /^(a|accuracy)$/) { $a = $_[$i+1]; - my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..." + my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existent..." splice @a, $j, $s; $j -= $s; $i++; } elsif ($_[$i] =~ /^(p|precision)$/) { $p = $_[$i+1]; - my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existant..." + my $s = 2; $s = 1 if @a-$j < 2; # avoid "can not modify non-existent..." splice @a, $j, $s; $j -= $s; $i++; } elsif ($_[$i] =~ /^(v|version)$/) @@ -257,7 +257,7 @@ bigrat - Transparent BigNumber/BigRational support for Perl print 1/3,"\n"; # 0.33333... } - # Note that this will make hex() and oct() be globally overriden: + # Note that this will make hex() and oct() be globally overridden: use bigrat qw/hex oct/; print hex("0x1234567890123490"),"\n"; print oct("01234567890123490"),"\n"; @@ -302,7 +302,7 @@ Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc: Using C warns if none of the specified libraries can be found and L did fall back to one of the default libraries. -To supress this warning, use C instead: +To suppress this warning, use C instead: use bignum try => 'GMP'; @@ -325,7 +325,7 @@ minus infinity. You will get '+inf' when dividing a positive number by 0, and Since all numbers are not objects, you can use all functions that are part of the BigInt or BigFloat API. It is wise to use only the bxxx() notation, and not -the fxxx() notation, though. This makes you independed on the fact that the +the fxxx() notation, though. This makes you independent on the fact that the underlying object might morph into a different class than BigFloat. =over 2 @@ -399,7 +399,7 @@ This method only works on Perl v5.9.4 or later. Math with the numbers is done (by default) by a module called -=head2 Cavaet +=head2 Caveat But a warning is in order. When using the following to make a copy of a number, only a shallow copy will be made. @@ -452,7 +452,7 @@ than or equal to zero. See Math::BigInt's bround() function for details. perl -Mbigrat=a,50 -le 'print sqrt(20)' -Note that setting precision and accurary at the same time is not possible. +Note that setting precision and accuracy at the same time is not possible. =item p or precision @@ -463,7 +463,7 @@ integer. See Math::BigInt's bfround() function for details. perl -Mbigrat=p,-50 -le 'print sqrt(20)' -Note that setting precision and accurary at the same time is not possible. +Note that setting precision and accuracy at the same time is not possible. =item t or trace @@ -492,7 +492,7 @@ and cannot be disabled with "no bigint;". =item oct Override the built-in oct() method with a version that can handle big -integers. Note that under Perl v5.9.4 or ealier, this will be global +integers. Note that under Perl v5.9.4 or earlier, this will be global and cannot be disabled with "no bigint;". =item v or version @@ -503,7 +503,7 @@ This prints out the name and version of all modules used and then exits. =back -=head1 CAVAETS +=head1 CAVEATS =over 2 @@ -539,11 +539,11 @@ Compare this to: =back =head1 EXAMPLES - + perl -Mbigrat -le 'print sqrt(33)' perl -Mbigrat -le 'print 2*255' perl -Mbigrat -le 'print 4.5+2*255' - perl -Mbigrat -le 'print 3/7 + 5/7 + 8/3' + perl -Mbigrat -le 'print 3/7 + 5/7 + 8/3' perl -Mbigrat -le 'print 12->is_odd()'; perl -Mbignum=l,GMP -le 'print 7 ** 7777' -- cgit v1.2.3