summaryrefslogtreecommitdiff
path: root/lib/Math
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Math')
-rw-r--r--lib/Math/BigInt.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Math/BigInt.pm b/lib/Math/BigInt.pm
index f76f2611f0..422dca42fd 100644
--- a/lib/Math/BigInt.pm
+++ b/lib/Math/BigInt.pm
@@ -214,7 +214,7 @@ sub mul { #(*int_num_array, *int_num_array) return int_num_array
for $x (@x) {
($car, $cty) = (0, $[);
for $y (@y) {
- $prod = $x * $y + $prod[$cty] + $car;
+ $prod = $x * $y + ($prod[$cty] || 0) + $car;
$prod[$cty++] =
$prod - ($car = int($prod * 1e-5)) * 1e5;
}