From c0ec26a98f6b2828d971cb2df88c3e7b7b96e858 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 28 Mar 2022 16:38:19 -0400 Subject: rename bigtimes() to big_multiply() --- big.c | 12 ++++++------ big.h | 2 +- reduce.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/big.c b/big.c index e895def..8c96896 100644 --- a/big.c +++ b/big.c @@ -494,7 +494,7 @@ int big_compare(word x, word y) } /* naive multiply - quadratic */ -word bigtimes(word x, word y) +word big_multiply(word x, word y) { /* important optimisation */ if (big__len(x) < big__len(y)) { @@ -610,9 +610,9 @@ word big_pow(word x, word y) d = digit(y); while (i--) { if (d & 1) { - r = bigtimes(r, x); + r = big_multiply(r, x); } - x = bigtimes(x, x); + x = big_multiply(x, x); d >>= 1; } y = rest(y); @@ -620,13 +620,13 @@ word big_pow(word x, word y) d = digit(y); if (d & 1) { - r = bigtimes(r, x); + r = big_multiply(r, x); } while (d >>= 1) { - x = bigtimes(x, x); + x = big_multiply(x, x); if (d & 1) { - r = bigtimes(r, x); + r = big_multiply(r, x); } } diff --git a/big.h b/big.h index 44b2b26..3617d90 100644 --- a/big.h +++ b/big.h @@ -37,7 +37,7 @@ word big_pow(word,word); word bigscan(char *); void bigsetup(void); word big_subtract(word,word); -word bigtimes(word,word); +word big_multiply(word,word); word bigtostr(word); word bigtostr8(word); word bigtostrx(word); diff --git a/reduce.c b/reduce.c index 956d5dc..2d72394 100644 --- a/reduce.c +++ b/reduce.c @@ -2067,7 +2067,7 @@ L3: if(arg1==NIL)lexfail(lastarg); setdbl(e,get_dbl(arg1)*force_dbl(lastarg)); else if(tag[lastarg]==DOUBLE) setdbl(e,big_tod(arg1)*get_dbl(lastarg)); - else simpl(bigtimes(arg1,lastarg)); + else simpl(big_multiply(arg1,lastarg)); goto DONE; case READY(INTDIV): -- cgit v1.2.1