summaryrefslogtreecommitdiff
path: root/mul_ui.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-11-21 15:21:33 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-11-21 15:21:33 +0000
commitebb0a24940eb551ce03eb361910c423fee7d6499 (patch)
tree46fccc5920d05d93d00ecd30aff4a012adba3d13 /mul_ui.c
parent1cc85c4f5a5658c530891f7348c153155b6dddbb (diff)
downloadmpfr-ebb0a24940eb551ce03eb361910c423fee7d6499.tar.gz
Infinis, premiere tentative.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@793 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mul_ui.c')
-rw-r--r--mul_ui.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mul_ui.c b/mul_ui.c
index 503e27a43..b2a22bdf6 100644
--- a/mul_ui.c
+++ b/mul_ui.c
@@ -40,6 +40,17 @@ mpfr_mul_ui(y, x, u, rnd_mode)
unsigned long xsize, ysize, cnt, dif, ex, sh;
TMP_DECL(marker);
+ if (MPFR_IS_INF(x))
+ {
+ if (u)
+ {
+ MPFR_SET_INF(y);
+ if (MPFR_SIGN(y) != MPFR_SIGN(x) * u) { MPFR_CHANGE_SIGN(y); }
+ return;
+ }
+ else { MPFR_SET_NAN(y); return; }
+ }
+
TMP_MARK(marker);
my = MPFR_MANT(y); ex = MPFR_EXP(x);
ysize = (MPFR_PREC(y)-1)/BITS_PER_MP_LIMB + 1;