diff options
Diffstat (limited to 'src/mul_2si.c')
-rw-r--r-- | src/mul_2si.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mul_2si.c b/src/mul_2si.c index 0b02e2940..bc5e47934 100644 --- a/src/mul_2si.c +++ b/src/mul_2si.c @@ -48,7 +48,8 @@ mpfr_mul_2si (mpfr_ptr y, mpfr_srcptr x, long int n, mpfr_rnd_t rnd_mode) if (rnd_mode == MPFR_RNDN && (__gmpfr_emin > MPFR_EMAX_MAX + (n + 1) || exp < __gmpfr_emin - (n + 1) || - (inexact >= 0 && mpfr_powerof2_raw (y)))) + ((MPFR_IS_NEG (y) ? inexact <= 0 : inexact >= 0) && + mpfr_powerof2_raw (y)))) rnd_mode = MPFR_RNDZ; return mpfr_underflow (y, rnd_mode, MPFR_SIGN(y)); } |