summaryrefslogtreecommitdiff
path: root/src/fma.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fma.c')
-rw-r--r--src/fma.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fma.c b/src/fma.c
index 2df3fd3f9..5bc7c28eb 100644
--- a/src/fma.c
+++ b/src/fma.c
@@ -261,9 +261,10 @@ mpfr_fma (mpfr_ptr s, mpfr_srcptr x, mpfr_srcptr y, mpfr_srcptr z,
MPFR_BLOCK_DECL (flags);
if (MPFR_GET_EXP (u) > MPFR_GET_EXP (z) &&
- MPFR_GET_EXP (u) - MPFR_GET_EXP (z) > MPFR_PREC (u) + 1)
+ MPFR_GET_EXP (u) - MPFR_GET_EXP (z) > MPFR_PREC (s) + 1)
{
- /* |z| < ulp(u)/4, therefore one can use z instead of z/4,
+ /* |z| < ulp(u)/4, where the ulp is meant with the precision
+ of the result s, therefore one can use z instead of z/4,
including when u is a power of 2! */
zz = z;
}