summaryrefslogtreecommitdiffstats
path: root/arith.txr
diff options
context:
space:
mode:
Diffstat (limited to 'arith.txr')
-rw-r--r--arith.txr14
1 files changed, 5 insertions, 9 deletions
diff --git a/arith.txr b/arith.txr
index 736645da..cba98be2 100644
--- a/arith.txr
+++ b/arith.txr
@@ -79,16 +79,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);
}
}