diff options
author | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-11-21 15:21:33 +0000 |
---|---|---|
committer | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-11-21 15:21:33 +0000 |
commit | ebb0a24940eb551ce03eb361910c423fee7d6499 (patch) | |
tree | 46fccc5920d05d93d00ecd30aff4a012adba3d13 /mul_ui.c | |
parent | 1cc85c4f5a5658c530891f7348c153155b6dddbb (diff) | |
download | mpfr-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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |