diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-11 16:42:20 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2002-04-11 16:42:20 +0000 |
commit | f9af193a03779305417be54494adc13a22ca4e56 (patch) | |
tree | 323079dde1f518c0f2bb83e9be77928543fb73ce | |
parent | 4b9990d70c33fc3ea4cd9036d776671aa7d0f11a (diff) | |
download | mpfr-f9af193a03779305417be54494adc13a22ca4e56.tar.gz |
mpfr_set_d bug fixed, but other bugs still remain...
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1858 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | BUGS | 2 | ||||
-rw-r--r-- | set_d.c | 6 |
2 files changed, 4 insertions, 4 deletions
@@ -13,3 +13,5 @@ Knowns bugs: * TMP_ALLOC problems in agm.c and sqrt.c. (Kevin Ryde, 05 March 2002) * get_d.c: still some problems with subnormals (the test fails). + +* mpfr_set_d may give wrong results on some architectures. @@ -179,14 +179,12 @@ mpfr_set_d (mpfr_ptr r, double d, mp_rnd_t rnd_mode) || ((x.s.sig == 0) && (MPFR_SIGN(r) < 0))) MPFR_CHANGE_SIGN(r); return 0; /* 0 is exact */ - } - + } else if (DOUBLE_ISNAN(d)) { MPFR_SET_NAN(r); - return 1; /* a NaN is always inexact */ + MPFR_RET_NAN; } - else if (DOUBLE_ISINF(d)) { MPFR_SET_INF(r); |