summaryrefslogtreecommitdiff
path: root/src/sqr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sqr.c')
-rw-r--r--src/sqr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sqr.c b/src/sqr.c
index 0cf6a4e13..3cd826567 100644
--- a/src/sqr.c
+++ b/src/sqr.c
@@ -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 */