summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-06-12 01:00:03 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2015-06-12 01:00:03 +0000
commita6e65f3d430315e6d40d82d7bd0f2e3a1224ef88 (patch)
tree339f572dec024cf38547a15e804e625e6dfa853a
parentb3caaa5d3969abbae1095b4c8d9e97d20186839a (diff)
downloadmpfr-a6e65f3d430315e6d40d82d7bd0f2e3a1224ef88.tar.gz
[src/fma.c] Partially fixed the scaling in case of underflow,
corresponding to the testcase from r9566. Double rounding is not handled yet (failure triggered by r9567). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9568 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--src/fma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/fma.c b/src/fma.c
index 33608f3d4..297fe1355 100644
--- a/src/fma.c
+++ b/src/fma.c
@@ -292,9 +292,8 @@ mpfr_fma (mpfr_ptr s, mpfr_srcptr x, mpfr_srcptr y, mpfr_srcptr z,
is not possible, but let's check that anyway. */
MPFR_ASSERTN (! MPFR_OVERFLOW (flags)); /* TODO... */
MPFR_ASSERTN (! MPFR_UNDERFLOW (flags)); /* not possible */
- inex2 = mpfr_div_2ui (s, s, scale, MPFR_RNDN);
- /* FIXME: this seems incorrect. MPFR_RNDN -> rnd_mode?
- Also, handle the double rounding case:
+ inex2 = mpfr_div_2ui (s, s, scale, rnd_mode);
+ /* FIXME: Handle the double rounding case:
s / 2^scale = 2^(emin - 2) in MPFR_RNDN. */
MPFR_LOG_MSG (("inex2=%d\n", inex2));
if (inex2) /* underflow */