summaryrefslogtreecommitdiff
path: root/lib/bigint.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bigint.pl')
-rw-r--r--lib/bigint.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bigint.pl b/lib/bigint.pl
index a2a0da977e..45ffe1d402 100644
--- a/lib/bigint.pl
+++ b/lib/bigint.pl
@@ -228,9 +228,9 @@ sub main'bdiv { #(dividend: num_str, divisor: num_str) return num_str
else {
push(@x, 0);
}
- @q = (); ($v2,$v1) = @y[$#y-1,$#y];
+ @q = (); ($v2,$v1) = @y[-2,-1];
while ($#x > $#y) {
- ($u2,$u1,$u0) = @x[($#x-2)..$#x];
+ ($u2,$u1,$u0) = @x[-3..-1];
$q = (($u0 == $v1) ? 99999 : int(($u0*1e5+$u1)/$v1));
--$q while ($v2*$q > ($u0*1e5+$u1-$q*$v1)*1e5+$u2);
if ($q) {