From b685352ab7b7567064725a13c8cc92e71010aa6f Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 28 Mar 2022 16:37:33 -0400 Subject: rename bigsub() to big_subtract() --- big.c | 12 ++++++------ big.h | 2 +- reduce.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/big.c b/big.c index 675635a..e895def 100644 --- a/big.c +++ b/big.c @@ -188,7 +188,7 @@ static struct big_div big__longdiv(word x, word y) } else if (lx == ly) { if (big_compare(x, y) >= 0) { - x = bigsub(x, y); + x = big_subtract(x, y); d = 1; } else { d = 0; @@ -201,15 +201,15 @@ static struct big_div big__longdiv(word x, word y) } if ((d -= 2) > 0) { - x = bigsub(x, big__stimes(y, d)); + x = big_subtract(x, big__stimes(y, d)); } else { d = 0; } if (big_compare(x, y) >= 0) { - x = bigsub(x, y), d++; + x = big_subtract(x, y), d++; if (big_compare(x, y) >= 0) { - x = bigsub(x, y); + x = big_subtract(x, y); d++; } } @@ -446,7 +446,7 @@ word big_add(word x, word y) } -word bigsub(word x, word y) +word big_subtract(word x, word y) { if (big_is_positive(x)) { if (big_is_positive(y)) { @@ -582,7 +582,7 @@ word big_remainder(word x, word y) if (s2) { if (!bigzero(bd.rem)) { - bd.rem = bigsub(y, bd.rem); + bd.rem = big_subtract(y, bd.rem); } } diff --git a/big.h b/big.h index a8c3ae8..44b2b26 100644 --- a/big.h +++ b/big.h @@ -36,7 +36,7 @@ word big_add(word,word); word big_pow(word,word); word bigscan(char *); void bigsetup(void); -word bigsub(word,word); +word big_subtract(word,word); word bigtimes(word,word); word bigtostr(word); word bigtostr8(word); diff --git a/reduce.c b/reduce.c index 6b88409..956d5dc 100644 --- a/reduce.c +++ b/reduce.c @@ -531,7 +531,7 @@ word e; upleft; lastarg= reduce(lastarg); /* ### */ if(tag[lastarg]==INT) - { hold = bigsub(lastarg,arg1); + { hold = big_subtract(lastarg,arg1); if(big_is_positive(hold))hd[e]=arg2,tl[e]=hold; else hd[e]=I,e=tl[e]=FAIL; } else hd[e]=I,e=tl[e]=FAIL; @@ -2056,7 +2056,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(bigsub(arg1,lastarg)); + else simpl(big_subtract(arg1,lastarg)); goto DONE; case READY(TIMES): -- cgit v1.2.1