From 054cdf7c885c574e6c111003c8767575a2a44666 Mon Sep 17 00:00:00 2001 From: pelissip Date: Thu, 18 Nov 2004 14:52:59 +0000 Subject: 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 --- tanh.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tanh.c') diff --git a/tanh.c b/tanh.c index a19f34efb..3b87a2bf1 100644 --- a/tanh.c +++ b/tanh.c @@ -30,7 +30,8 @@ mpfr_tanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode) /****** Declaration ******/ mpfr_t x; int inexact; - + MPFR_SAVE_EXPO_DECL (expo); + /* Special value checking */ if (MPFR_UNLIKELY(MPFR_IS_SINGULAR(xt))) { @@ -55,7 +56,7 @@ mpfr_tanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode) } } - mpfr_save_emin_emax (); + MPFR_SAVE_EXPO_MARK (expo); MPFR_TMP_INIT_ABS (x, xt); /* General case */ @@ -114,7 +115,7 @@ mpfr_tanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode) mpfr_clear (te); mpfr_clear (t); } - mpfr_restore_emin_emax (); + MPFR_SAVE_EXPO_FREE (expo); return mpfr_check_range (y, inexact, rnd_mode); } -- cgit v1.2.1