summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--big.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/big.c b/big.c
index 78049eb..2a640e5 100644
--- a/big.c
+++ b/big.c
@@ -313,7 +313,6 @@ word bigtimes(word x, word y)
return (r);
}
- //word d = digit0(y);
word s = big_is_negative(y);
for (word n = 0, d = digit0(y); y; n++, d = digit(y)) {
if (d) {
@@ -321,18 +320,19 @@ word bigtimes(word x, word y)
}
y = rest(y);
- //d = digit(y);
}
return (s != big_is_negative(x) ? bignegate(r) : r);
}
-word shift(n, x) /* multiply big x by n'th power of IBASE */
-word n, x;
+/* multiply big x by n'th power of IBASE */
+word shift(word n, word x)
{
- while (n--)
+ while (n--) {
x = make(INT, 0, x);
- return (x);
-} /* NB - we assume x non-zero, else unnormalised result */
+ }
+
+ return x;
+}
word stimes(x, n) /* multiply big x (>=0) by digit n (>0) */
word x, n;