summaryrefslogtreecommitdiffstats
path: root/arith.c
diff options
context:
space:
mode:
Diffstat (limited to 'arith.c')
-rw-r--r--arith.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/arith.c b/arith.c
index 85a0f346..5c59af23 100644
--- a/arith.c
+++ b/arith.c
@@ -74,16 +74,12 @@ static val bignum_dbl_ipt(double_intptr_t di)
static val normalize(val bignum)
{
- switch (mp_cmp_mag(mp(bignum), &NUM_MAX_MP)) {
- case MP_EQ:
- case MP_GT:
+ if (mp_cmp_mag(mp(bignum), &NUM_MAX_MP) == MP_GT) {
return bignum;
- default:
- {
- cnum fixnum;
- mp_get_intptr(mp(bignum), &fixnum);
- return num(fixnum);
- }
+ } else {
+ cnum fixnum;
+ mp_get_intptr(mp(bignum), &fixnum);
+ return num(fixnum);
}
}