summaryrefslogtreecommitdiff
path: root/big.c
diff options
context:
space:
mode:
Diffstat (limited to 'big.c')
-rw-r--r--big.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/big.c b/big.c
index d1cff5f..919390d 100644
--- a/big.c
+++ b/big.c
@@ -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;
{