summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-11 16:42:20 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-11 16:42:20 +0000
commitf9af193a03779305417be54494adc13a22ca4e56 (patch)
tree323079dde1f518c0f2bb83e9be77928543fb73ce
parent4b9990d70c33fc3ea4cd9036d776671aa7d0f11a (diff)
downloadmpfr-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--BUGS2
-rw-r--r--set_d.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/BUGS b/BUGS
index 74ed91a5e..d7e6828e2 100644
--- a/BUGS
+++ b/BUGS
@@ -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.
diff --git a/set_d.c b/set_d.c
index 6514f9477..600993176 100644
--- a/set_d.c
+++ b/set_d.c
@@ -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);