diff options
-rw-r--r-- | src/sqr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -82,7 +82,7 @@ mpfr_sqr_1 (mpfr_ptr a, mpfr_srcptr b, mpfr_rnd_t rnd_mode, mpfr_prec_t p) rounding: MPFR_EXP (a) = ax; /* Don't use MPFR_SET_EXP since ax might be < __gmpfr_emin in the cases "goto rounding" above. */ - if (rb == 0 && sb == 0) + if ((rb == 0 && sb == 0) || (rnd_mode == MPFR_RNDF)) { MPFR_ASSERTD(ax >= __gmpfr_emin); return 0; /* idem than MPFR_RET(0) but faster */ @@ -183,7 +183,7 @@ mpfr_sqr_2 (mpfr_ptr a, mpfr_srcptr b, mpfr_rnd_t rnd_mode, mpfr_prec_t p) rounding: MPFR_EXP (a) = ax; /* Don't use MPFR_SET_EXP since ax might be < __gmpfr_emin in the cases "goto rounding" above. */ - if (rb == 0 && sb == 0) + if ((rb == 0 && sb == 0) || (rnd_mode == MPFR_RNDF)) { MPFR_ASSERTD(ax >= __gmpfr_emin); return 0; /* idem than MPFR_RET(0) but faster */ @@ -322,7 +322,7 @@ mpfr_sqr_3 (mpfr_ptr a, mpfr_srcptr b, mpfr_rnd_t rnd_mode, mpfr_prec_t p) rounding: MPFR_EXP (a) = ax; /* Don't use MPFR_SET_EXP since ax might be < __gmpfr_emin in the cases "goto rounding" above. */ - if (rb == 0 && sb == 0) + if ((rb == 0 && sb == 0) || (rnd_mode == MPFR_RNDF)) { MPFR_ASSERTD(ax >= __gmpfr_emin); return 0; /* idem than MPFR_RET(0) but faster */ |