diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-12 01:00:03 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-12 01:00:03 +0000 |
commit | a6e65f3d430315e6d40d82d7bd0f2e3a1224ef88 (patch) | |
tree | 339f572dec024cf38547a15e804e625e6dfa853a | |
parent | b3caaa5d3969abbae1095b4c8d9e97d20186839a (diff) | |
download | mpfr-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 */ |