diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:01:27 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:01:27 -0400 |
commit | 69a209875107dce06174442d214c92f2fe748aae (patch) | |
tree | 1eb0fd486d3268e4354f4208eda0cc5ded89a5c8 /reduce.c | |
parent | 427349ba1556a2efb131ee05f4f3752e35d06957 (diff) |
modify longdiv() and shortdiv() to return structs, eliminating another global, rename bigdiv() and bigmod() to big_divide() and big_remainder() to ensure no call sights are missed
Diffstat (limited to 'reduce.c')
-rw-r--r-- | reduce.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2075,8 +2075,8 @@ L3: if(arg1==NIL)lexfail(lastarg); GETARG(arg1); UPLEFT; if(tag[arg1]==DOUBLE||tag[lastarg]==DOUBLE)int_error("div"); - if(bigzero(lastarg))div_error(); /* build into bigmod ? */ - simpl(bigdiv(arg1,lastarg)); + if(bigzero(lastarg))div_error(); /* build into big_remainder ? */ + simpl(big_divide(arg1,lastarg)); goto DONE; case READY(FDIV): @@ -2086,7 +2086,7 @@ L3: if(arg1==NIL)lexfail(lastarg); /* experiment, suppressed if(tag[lastarg]==INT&&tag[arg1]==INT&&!bigzero(lastarg)) { extern word b_rem; - int d = bigdiv(arg1,lastarg); + int d = big_divide(arg1,lastarg); if(bigzero(b_rem)){ simpl(d); goto DONE; } } /* makes a/b integer if a, b integers dividing exactly */ fa=force_dbl(arg1); @@ -2100,8 +2100,8 @@ L3: if(arg1==NIL)lexfail(lastarg); GETARG(arg1); UPLEFT; if(tag[arg1]==DOUBLE||tag[lastarg]==DOUBLE)int_error("mod"); - if(bigzero(lastarg))div_error(); /* build into bigmod ? */ - simpl(bigmod(arg1,lastarg)); + if(bigzero(lastarg))div_error(); /* build into big_remainder ? */ + simpl(big_remainder(arg1,lastarg)); goto DONE; case READY(POWER): |