summaryrefslogtreecommitdiff
path: root/mul_ui.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-05-31 16:56:11 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2001-05-31 16:56:11 +0000
commit687b7c222c25812207419f16844a1ca22ad5b8e2 (patch)
treec646bc4c8a36eb6025948d42ec78754a5cfe1602 /mul_ui.c
parent0c0fec1be24c97066f0ca3f624cd1bc7a8e9cda2 (diff)
downloadmpfr-687b7c222c25812207419f16844a1ca22ad5b8e2.tar.gz
Patch for the case b = 0 or c = 0.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1087 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul_ui.c')
-rw-r--r--mul_ui.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mul_ui.c b/mul_ui.c
index e92a79155..64ace5875 100644
--- a/mul_ui.c
+++ b/mul_ui.c
@@ -60,6 +60,11 @@ mpfr_mul_ui(y, x, u, rnd_mode)
else { MPFR_SET_NAN(y); return; }
}
+ if (MPFR_IS_ZERO(x) || !u)
+ {
+ MPFR_CLEAR_FLAGS(y); MPFR_SET_ZERO(y); return;
+ }
+
MPFR_CLEAR_FLAGS(y);
TMP_MARK(marker);