summaryrefslogtreecommitdiff
path: root/const_log2.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-11-18 14:52:59 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-11-18 14:52:59 +0000
commit054cdf7c885c574e6c111003c8767575a2a44666 (patch)
tree49713e889d7f8ccbdad01a07e92ff3cdf8f9c27e /const_log2.c
parentef4cc77a66014090216445e952b0ccb9fc461e46 (diff)
downloadmpfr-054cdf7c885c574e6c111003c8767575a2a44666.tar.gz
Replace use of mpfr_save_emin_emax () / mpfr_restore_emin_emax()
by MPFR_SAVE_EXPO macros (DECL, MARK and FREE) which are faster and thread safe. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3100 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'const_log2.c')
-rw-r--r--const_log2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/const_log2.c b/const_log2.c
index 83e19a5b4..8d47abfa5 100644
--- a/const_log2.c
+++ b/const_log2.c
@@ -129,8 +129,9 @@ int
mp_prec_t N, k, precx;
mpz_t s, t, u;
int inexact;
+ MPFR_SAVE_EXPO_DECL (expo);
- mpfr_save_emin_emax ();
+ MPFR_SAVE_EXPO_MARK (expo);
precx = MPFR_PREC(x);
/* need to recompute */
@@ -163,7 +164,6 @@ int
else /* use binary splitting method */
inexact = mpfr_const_aux_log2 (x, rnd_mode);
- mpfr_restore_emin_emax ();
-
+ MPFR_SAVE_EXPO_FREE (expo);
return mpfr_check_range (x, inexact, rnd_mode);
}