summaryrefslogtreecommitdiff
path: root/sinh.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-02-10 15:43:41 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2005-02-10 15:43:41 +0000
commit667b2763ad6e7b02174303e6646e49f37e80a677 (patch)
tree820dfe4fc5f18fec632e9ee60ada8d3add40b89b /sinh.c
parenta9c75f5b66a8b6379b0c8d4782949ba935cb86c8 (diff)
downloadmpfr-667b2763ad6e7b02174303e6646e49f37e80a677.tar.gz
Add log for other functions.
Add ZivLoop too. Cleanup exp3. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3290 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'sinh.c')
-rw-r--r--sinh.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sinh.c b/sinh.c
index 09bebcb07..07888ab1d 100644
--- a/sinh.c
+++ b/sinh.c
@@ -52,7 +52,8 @@ mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt, mp_rnd_t rnd_mode)
MPFR_RET(0);
}
}
-
+ MPFR_LOG_BEGIN (("x[%#R]=%R rnd=%d", x, x, rnd_mode));
+
MPFR_TMP_INIT_ABS (x, xt);
{
@@ -60,6 +61,7 @@ mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt, mp_rnd_t rnd_mode)
mp_exp_t d;
mp_prec_t Nt; /* Precision of the intermediary variable */
long int err; /* Precision of error */
+ MPFR_ZIV_DECL (loop);
int overflow_p = mpfr_overflow_p ();
/* compute the precision of intermediary variable */
@@ -75,6 +77,7 @@ mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt, mp_rnd_t rnd_mode)
mpfr_init2 (ti, Nt);
/* First computation of sinh */
+ MPFR_ZIV_INIT (loop, Nt);
for (;;) {
/* compute sinh */
mpfr_clear_overflow ();
@@ -105,11 +108,12 @@ mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt, mp_rnd_t rnd_mode)
break;
}
/* actualisation of the precision */
- Nt += MAX (BITS_PER_MP_LIMB, err);
+ Nt += err;
+ MPFR_ZIV_NEXT (loop, Nt);
mpfr_set_prec (t, Nt);
mpfr_set_prec (ti, Nt);
}
-
+ MPFR_ZIV_FREE (loop);
inexact = mpfr_set4 (y, t, rnd_mode, MPFR_SIGN (xt));
if (overflow_p != 0)
__gmpfr_flags |= MPFR_FLAGS_OVERFLOW;
@@ -117,6 +121,7 @@ mpfr_sinh (mpfr_ptr y, mpfr_srcptr xt, mp_rnd_t rnd_mode)
mpfr_clear (t);
mpfr_clear (ti);
}
-
+ MPFR_LOG_END (("y[%#R]=%R inexact=%d", y, y, inexact));
+
return inexact;
}