summaryrefslogtreecommitdiff
path: root/src/mul.c
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-02-23 14:22:59 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-02-23 14:22:59 +0000
commit12bbdc3e2e0e57ff470668d6e656963c4faeb051 (patch)
tree021c9b22c1e77ab480ff40de51b0e907e9f296a7 /src/mul.c
parente38280cb6d1a9425fded5744dbe4a5837145cd52 (diff)
downloadmpc-12bbdc3e2e0e57ff470668d6e656963c4faeb051.tar.gz
mul.c, mul.dat: bug fix for wrong detection of underflow
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@949 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/mul.c')
-rw-r--r--src/mul.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mul.c b/src/mul.c
index a606fab..6722198 100644
--- a/src/mul.c
+++ b/src/mul.c
@@ -202,7 +202,7 @@ mpfr_fmam (mpfr_ptr z, mpfr_srcptr a, mpfr_srcptr b, mpfr_srcptr c,
if (mpfr_inf_p (z))
inex = (mpfr_signbit (z) ? -1 : 1);
- if (mpfr_nan_p (z) || mpfr_zero_p (z)) {
+ if (mpfr_nan_p (z) || (mpfr_zero_p (u) && mpfr_zero_p (v))) {
/* In the first case, u and v are infinities with opposite signs.
In the second case, u and v are zeroes. If they have opposite
signs, the result is zero, but we need to determine its sign.