From 1e88edcf7cb78cc454a39e6d1f2b204c218b5b04 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 15 Jul 2015 13:48:37 +0000 Subject: [src/exceptions.c] Added logging for mpfr_underflow and mpfr_overflow. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9615 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/exceptions.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/exceptions.c b/src/exceptions.c index 1f0eea29a..14b57e7e7 100644 --- a/src/exceptions.c +++ b/src/exceptions.c @@ -374,6 +374,11 @@ mpfr_underflow (mpfr_ptr x, mpfr_rnd_t rnd_mode, int sign) { int inex; + MPFR_LOG_FUNC + (("x[%Pu]=%.*Rg rnd=%d sign=%d", mpfr_get_prec (x), mpfr_log_prec, x, + rnd_mode, sign), + ("x[%Pu]=%.*Rg", mpfr_get_prec (x), mpfr_log_prec, x)); + MPFR_ASSERT_SIGN (sign); if (MPFR_IS_LIKE_RNDZ(rnd_mode, sign < 0)) @@ -398,7 +403,13 @@ mpfr_overflow (mpfr_ptr x, mpfr_rnd_t rnd_mode, int sign) { int inex; - MPFR_ASSERT_SIGN(sign); + MPFR_LOG_FUNC + (("x[%Pu]=%.*Rg rnd=%d sign=%d", mpfr_get_prec (x), mpfr_log_prec, x, + rnd_mode, sign), + ("x[%Pu]=%.*Rg", mpfr_get_prec (x), mpfr_log_prec, x)); + + MPFR_ASSERT_SIGN (sign); + if (MPFR_IS_LIKE_RNDZ(rnd_mode, sign < 0)) { mpfr_setmax (x, __gmpfr_emax); -- cgit v1.2.1