diff options
Diffstat (limited to 'contrib/perl5/lib/Math/BigInt.pm')
-rw-r--r-- | contrib/perl5/lib/Math/BigInt.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/perl5/lib/Math/BigInt.pm b/contrib/perl5/lib/Math/BigInt.pm index ef4af61..b61b884 100644 --- a/contrib/perl5/lib/Math/BigInt.pm +++ b/contrib/perl5/lib/Math/BigInt.pm @@ -258,9 +258,9 @@ sub bdiv { #(dividend: num_str, divisor: num_str) return num_str else { push(@x, 0); } - @q = (); ($v2,$v1) = @y[-2,-1]; + @q = (); ($v2,$v1) = ($y[-2] || 0, $y[-1]); while ($#x > $#y) { - ($u2,$u1,$u0) = @x[-3..-1]; + ($u2,$u1,$u0) = ($x[-3] || 0, $x[-2] || 0, $x[-1]); $q = (($u0 == $v1) ? 99999 : int(($u0*1e5+$u1)/$v1)); --$q while ($v2*$q > ($u0*1e5+$u1-$q*$v1)*1e5+$u2); if ($q) { @@ -400,8 +400,8 @@ In particular perl -MMath::BigInt=:constant -e 'print 2**100' -print the integer value of C<2**100>. Note that without convertion of -constants the expression 2**100 will be calculatted as floating point number. +print the integer value of C<2**100>. Note that without conversion of +constants the expression 2**100 will be calculated as floating point number. =head1 BUGS |