summaryrefslogtreecommitdiff
path: root/src/fma.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-08-21 11:33:33 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2014-08-21 11:33:33 +0000
commitab5c3e2e0a6e4a25e5d9514f89a6422c6a231410 (patch)
treebc35208df81e9d63dc70b053c29a4749e330512d /src/fma.c
parent7d5fc3260c1cac1e172eee9eab35bae276132790 (diff)
downloadmpfr-ab5c3e2e0a6e4a25e5d9514f89a6422c6a231410.tar.gz
[src] Cleaner use of MPFR_SET_SIGN.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9187 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/fma.c')
-rw-r--r--src/fma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fma.c b/src/fma.c
index 431855677..ba8417175 100644
--- a/src/fma.c
+++ b/src/fma.c
@@ -75,11 +75,11 @@ mpfr_fma_singular (mpfr_ptr s, mpfr_srcptr x, mpfr_srcptr y, mpfr_srcptr z,
{
int sign_p;
sign_p = MPFR_MULT_SIGN( MPFR_SIGN(x) , MPFR_SIGN(y) );
- MPFR_SET_SIGN(s,(rnd_mode != MPFR_RNDD ?
- ((MPFR_IS_NEG_SIGN(sign_p) && MPFR_IS_NEG(z))
- ? -1 : 1) :
- ((MPFR_IS_POS_SIGN(sign_p) && MPFR_IS_POS(z))
- ? 1 : -1)));
+ MPFR_SET_SIGN(s, (rnd_mode != MPFR_RNDD ?
+ (MPFR_IS_NEG_SIGN(sign_p) && MPFR_IS_NEG(z) ?
+ MPFR_SIGN_NEG : MPFR_SIGN_POS) :
+ (MPFR_IS_POS_SIGN(sign_p) && MPFR_IS_POS(z) ?
+ MPFR_SIGN_POS : MPFR_SIGN_NEG)));
MPFR_SET_ZERO(s);
MPFR_RET(0);
}