diff options
Diffstat (limited to 'ui_sub.c')
-rw-r--r-- | ui_sub.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -39,19 +39,19 @@ mpfr_ui_sub (mpfr_ptr y, unsigned long int u, mpfr_srcptr x, mp_rnd_t rnd_mode) MPFR_SET_NAN(y); MPFR_RET_NAN; } - if (MPFR_IS_INF(x)) + else if (MPFR_IS_INF(x)) { /* u - Inf = -Inf and u - -Inf = +Inf */ MPFR_SET_INF(y); MPFR_SET_OPPOSITE_SIGN(y,x); MPFR_RET(0); /* +/-infinity is exact */ } - if (MPFR_IS_ZERO(x)) + else if (MPFR_IS_ZERO(x)) /* u - 0 = u */ return mpfr_set_ui(y, u, rnd_mode); /* Should never reach this code */ - MPFR_ASSERTN(1); - return 0; /* To avoid a warning. It isn't reached */ + else + MPFR_ASSERTN(0); } else if (u) { |