diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:31:47 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:31:47 -0400 |
commit | 774e2bbb0e363d29394239b9848a519bc68ac4e1 (patch) | |
tree | 02f418635aaf32e23c36210cd229850a5eeeb98c | |
parent | 600b548442dc0679f89b16ebb6225bdc4465db37 (diff) |
rename bigtodbl() to big_tod()
-rw-r--r-- | big.c | 2 | ||||
-rw-r--r-- | big.h | 4 | ||||
-rw-r--r-- | reduce.c | 18 |
3 files changed, 12 insertions, 12 deletions
@@ -633,7 +633,7 @@ word bigpow(word x, word y) return r; } -double bigtodbl(word x) +double big_tod(word x) { word s = big_is_negative(x); double b = 1.0; @@ -24,7 +24,7 @@ long long big_toll(word); word big_fromll(long long); -double bigtodbl(word); +double big_tod(word); double biglog(word); double biglog10(word); int bigcmp(word,word); @@ -46,7 +46,7 @@ word dbltobig(double); int isnat(word); word strtobig(word,int); -#define force_dbl(x) ((tag[(x)] == INT) ? bigtodbl((x)) : get_dbl((x))) +#define force_dbl(x) ((tag[(x)] == INT) ? big_tod((x)) : get_dbl((x))) /* END OF DEFINITIONS FOR INTEGER PACKAGE */ @@ -70,10 +70,10 @@ word a,b; L: switch(tag[a]) { case DOUBLE: if(tag[b]==DOUBLE)return(fsign(get_dbl(a)-get_dbl(b))); - else return(fsign(get_dbl(a)-bigtodbl(b))); + else return(fsign(get_dbl(a)-big_tod(b))); case INT: if(tag[b]==INT)return(bigcmp(a,b)); - else return(fsign(bigtodbl(a)-get_dbl(b))); + else return(fsign(big_tod(a)-get_dbl(b))); case UNICODE: return sign(get_char(a)-get_char(b)); case ATOM: if(tag[b]==UNICODE) return sign(get_char(a)-get_char(b)); @@ -2044,7 +2044,7 @@ L3: if(arg1==NIL)lexfail(lastarg); if(tag[arg1]==DOUBLE) setdbl(e,get_dbl(arg1)+force_dbl(lastarg)); else if(tag[lastarg]==DOUBLE) - setdbl(e,bigtodbl(arg1)+get_dbl(lastarg)); + setdbl(e,big_tod(arg1)+get_dbl(lastarg)); else simpl(bigplus(arg1,lastarg)); goto DONE; @@ -2055,7 +2055,7 @@ L3: if(arg1==NIL)lexfail(lastarg); if(tag[arg1]==DOUBLE) setdbl(e,get_dbl(arg1)-force_dbl(lastarg)); else if(tag[lastarg]==DOUBLE) - setdbl(e,bigtodbl(arg1)-get_dbl(lastarg)); + setdbl(e,big_tod(arg1)-get_dbl(lastarg)); else simpl(bigsub(arg1,lastarg)); goto DONE; @@ -2066,7 +2066,7 @@ L3: if(arg1==NIL)lexfail(lastarg); if(tag[arg1]==DOUBLE) setdbl(e,get_dbl(arg1)*force_dbl(lastarg)); else if(tag[lastarg]==DOUBLE) - setdbl(e,bigtodbl(arg1)*get_dbl(lastarg)); + setdbl(e,big_tod(arg1)*get_dbl(lastarg)); else simpl(bigtimes(arg1,lastarg)); goto DONE; @@ -2113,9 +2113,9 @@ L3: if(arg1==NIL)lexfail(lastarg); if(fa<0.0)errno=EDOM,math_error("^"); fb=get_dbl(lastarg); }else if(tag[arg1]==DOUBLE) - fa=get_dbl(arg1),fb=bigtodbl(lastarg); else + fa=get_dbl(arg1),fb=big_tod(lastarg); else if(big_is_negative(lastarg)) - fa=bigtodbl(arg1),fb=bigtodbl(lastarg); + fa=big_tod(arg1),fb=big_tod(lastarg); else { simpl(bigpow(arg1,lastarg)); goto DONE; } errno=0; /* to clear */ @@ -2145,7 +2145,7 @@ L3: if(arg1==NIL)lexfail(lastarg); hd[e]=I; e=tl[e]=str_conv(linebuf); goto DONE; -#define coerce_dbl(x) tag[x]==DOUBLE?(x):sto_dbl(bigtodbl(x)) +#define coerce_dbl(x) tag[x]==DOUBLE?(x):sto_dbl(big_tod(x)) case READY(STEP): /* STEP i a => GENSEQ (i,NIL) a */ RESTORE(e); @@ -2274,7 +2274,7 @@ word x,y; { if(tag[x]==DOUBLE) return(sto_dbl(get_dbl(x)+force_dbl(y))); if(tag[y]==DOUBLE) - return(sto_dbl(bigtodbl(x)+get_dbl(y))); + return(sto_dbl(big_tod(x)+get_dbl(y))); return(bigplus(x,y)); } |