summaryrefslogtreecommitdiff
path: root/set.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-05-29 13:45:51 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2000-05-29 13:45:51 +0000
commitb43ebced9b6a128143764a8e4907c784f08493be (patch)
tree53ce5adfffbac99dea506a1cb4eefa9bff7dbbe6 /set.c
parent6272879a5590ac22ffc740458abaaeac15633939 (diff)
downloadmpfr-b43ebced9b6a128143764a8e4907c784f08493be.tar.gz
now deals with NaN
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@595 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set.c')
-rw-r--r--set.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/set.c b/set.c
index cf10e1cdd..2b1174c9d 100644
--- a/set.c
+++ b/set.c
@@ -37,6 +37,8 @@ mpfr_set4(a, b, rnd_mode, signb)
{
int carry, an, preca = PREC(a), sh; mp_limb_t *ap = MANT(a);
+ if (FLAG_NAN(b)) { SET_NAN(a); return; }
+
carry = mpfr_round_raw(ap, MANT(b), PREC(b), (signb<0), preca, rnd_mode);
EXP(a) = EXP(b);
if (carry) {