summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>2000-12-13 14:50:13 +0000
commit3035f62d87667e08ac5370bca1e47fe8f683c2e8 (patch)
treec92b2c9b03671e77b17f5ca89f731e53cdfaa1ce /log.c
parentee574c97721b76618933ca6d5738f948e7abe1ec (diff)
downloadmpfr-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.c b/log.c
index 3240aa4c1..419ad5e0b 100644
--- a/log.c
+++ b/log.c
@@ -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);