diff options
Diffstat (limited to 'big.c')
-rw-r--r-- | big.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -100,21 +100,24 @@ word bignegate(word x) return make(INT, SIGNBIT | hd[x], tl[x]); } -word bigplus(x, y) -word x, y; +word bigplus(word x, word y) { - if (big_is_positive(x)) - if (big_is_positive(y)) + if (big_is_positive(x)) { + if (big_is_positive(y)) { return (big_plus(x, y, 0)); - else - return (big_sub(x, y)); - else if (big_is_positive(y)) + } + return (big_sub(x, y)); + } + + if (big_is_positive(y)) { return (big_sub(y, x)); - else - return (big_plus(x, y, SIGNBIT)); /* both negative */ + } + + return (big_plus(x, y, SIGNBIT)); /* both negative */ } -word big_plus(x, y, signbit) /* ignore input signs, treat x,y as positive */ +/* ignore input signs, treat x,y as positive */ +word big_plus(x, y, signbit) word x, y; int signbit; { |