summaryrefslogtreecommitdiff
path: root/sub.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-09-26 08:15:34 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-09-26 08:15:34 +0000
commite25de7c5f1957055069cc77ca0231fa069745f25 (patch)
tree4ad3d15146e3dfc422e4e45d4b27893856e113c9 /sub.c
parent6bbaa4c44d3b4f6b07b5b0101ee823e81acfb72e (diff)
downloadmpfr-e25de7c5f1957055069cc77ca0231fa069745f25.tar.gz
fixed wrong inexact flag for a - b where a and b are of different signs
and EXP(a) < EXP(b) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2032 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sub.c')
-rw-r--r--sub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sub.c b/sub.c
index be98685cc..37689c65f 100644
--- a/sub.c
+++ b/sub.c
@@ -100,7 +100,7 @@ mpfr_sub (mpfr_ptr a, mpfr_srcptr b, mpfr_srcptr c, mp_rnd_t rnd_mode)
inexact = mpfr_add1(a, c, b, rnd_mode,
(mp_exp_unsigned_t) MPFR_EXP(c) - MPFR_EXP(b));
MPFR_CHANGE_SIGN(a);
- return inexact;
+ return -inexact;
}
else
{