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 /exp2.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 'exp2.c')
-rw-r--r-- | exp2.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -106,6 +106,14 @@ mpfr_exp2(y, x, rnd_mode) TMP_DECL(marker); if (MPFR_IS_NAN(x)) { MPFR_SET_NAN(y); return 1; } + if (MPFR_IS_INF(x)) + { + if (MPFR_SIGN(x) > 0) + { MPFR_SET_INF(y); if (MPFR_SIGN(y) == -1) { MPFR_CHANGE_SIGN(y); } } + else + { MPFR_SET_ZERO(y); if (MPFR_SIGN(y) == -1) { MPFR_CHANGE_SIGN(y); } } + /* TODO: conflits entre infinis et zeros ? */ + } if (!MPFR_NOTZERO(x)) { mpfr_set_ui(y, 1, GMP_RNDN); return 0; } expx = MPFR_EXP(x); |