diff options
author | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-13 14:50:13 +0000 |
---|---|---|
committer | hanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4> | 2000-12-13 14:50:13 +0000 |
commit | 3035f62d87667e08ac5370bca1e47fe8f683c2e8 (patch) | |
tree | c92b2c9b03671e77b17f5ca89f731e53cdfaa1ce /log.c | |
parent | ee574c97721b76618933ca6d5738f948e7abe1ec (diff) | |
download | mpfr-3035f62d87667e08ac5370bca1e47fe8f683c2e8.tar.gz |
Take into account Inf, Nans ; clear the flags of the return variable
in most function calls.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@851 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -76,6 +76,9 @@ mpfr_log(r, a, rnd_mode) MPFR_SET_INF(r); if (MPFR_SIGN(r) != 1) { MPFR_CHANGE_SIGN(r); } } + /* Now we can clear the flags without damage even if r == a */ + MPFR_CLEAR_FLAGS(r); + /* If a is 1, the result is 0 */ if (mpfr_cmp_ui_2exp(a,1,0)==0){ MPFR_SET_ZERO(r); |