diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-15 17:11:49 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-15 17:11:49 +0000 |
commit | 0fc8be56956c19b24c02c1e2299df746c5865382 (patch) | |
tree | 5b71c6438a696f0b55566848df1abd0edf18b555 /sqrt.c | |
parent | 3f3cd6e438e072fef65a470c3a56d4147d7e5c4e (diff) | |
download | mpfr-0fc8be56956c19b24c02c1e2299df746c5865382.tar.gz |
clear NaN/Inf flags in normal case
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@885 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sqrt.c')
-rw-r--r-- | sqrt.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -49,7 +49,10 @@ mpfr_sqrt (r, u, rnd_mode) char can_round = 0; TMP_DECL (marker); TMP_DECL(marker0); - if (MPFR_IS_NAN(u) || MPFR_SIGN(u) == -1) { MPFR_SET_NAN(r); return 1; } + if (MPFR_IS_NAN(u) || MPFR_SIGN(u) == -1) { + MPFR_SET_NAN(r); + return 1; + } if (MPFR_SIGN(r) != 1) { MPFR_CHANGE_SIGN(r); } if (MPFR_IS_INF(u)) @@ -58,6 +61,8 @@ mpfr_sqrt (r, u, rnd_mode) return 1; } + MPFR_CLEAR_FLAGS (r); + prec = MPFR_PREC(r); if (!MPFR_NOTZERO(u)) |