summaryrefslogtreecommitdiff
path: root/mul_ui.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
commit3035f62d87667e08ac5370bca1e47fe8f683c2e8 (patch)
treec92b2c9b03671e77b17f5ca89f731e53cdfaa1ce /mul_ui.c
parentee574c97721b76618933ca6d5738f948e7abe1ec (diff)
downloadmpfr-3035f62d87667e08ac5370bca1e47fe8f683c2e8.tar.gz
Take into account Inf, Nans ; clear the flags of the return variable
in most function calls. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@851 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul_ui.c')
-rw-r--r--mul_ui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mul_ui.c b/mul_ui.c
index fd61e3034..44a1dc1d3 100644
--- a/mul_ui.c
+++ b/mul_ui.c
@@ -45,12 +45,14 @@ mpfr_mul_ui(y, x, u, rnd_mode)
if (u)
{
MPFR_SET_INF(y);
- if (MPFR_SIGN(y) != MPFR_SIGN(x) * u) { MPFR_CHANGE_SIGN(y); }
+ if (MPFR_SIGN(y) != MPFR_SIGN(x)) { MPFR_CHANGE_SIGN(y); }
return;
}
else { MPFR_SET_NAN(y); return; }
}
+ MPFR_CLEAR_FLAGS(y);
+
TMP_MARK(marker);
my = MPFR_MANT(y); ex = MPFR_EXP(x);
ysize = (MPFR_PREC(y)-1)/BITS_PER_MP_LIMB + 1;