diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-05-29 13:45:51 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-05-29 13:45:51 +0000 |
commit | b43ebced9b6a128143764a8e4907c784f08493be (patch) | |
tree | 53ce5adfffbac99dea506a1cb4eefa9bff7dbbe6 /set.c | |
parent | 6272879a5590ac22ffc740458abaaeac15633939 (diff) | |
download | mpfr-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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |