projects
/
p5sagit/p5-mst-13.2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
0e505df
)
Fix undef warning in Math::BigInt
Chip Salzenberg [Tue, 19 Nov 1996 00:07:25 +0000 (12:07 +1200)]
lib/Math/BigInt.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Math/BigInt.pm
b/lib/Math/BigInt.pm
index
f76f261
..
422dca4
100644
(file)
--- 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;
}