diff options
author | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-06-09 15:43:45 +0000 |
---|---|---|
committer | enge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-06-09 15:43:45 +0000 |
commit | be879d12d4fbb4bb5ad86309ec40620a04502b9b (patch) | |
tree | e49576465a0552bf392235cac4cb09b39582efb1 | |
parent | c0e8f19061f91db1c190d5747264a1b6aac45335 (diff) | |
download | mpc-be879d12d4fbb4bb5ad86309ec40620a04502b9b.tar.gz |
removed logging macros, which were essentially unused
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@587 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r-- | TODO | 7 | ||||
-rw-r--r-- | configure.ac | 12 | ||||
-rw-r--r-- | src/mpc-impl.h | 42 | ||||
-rw-r--r-- | src/tan.c | 9 |
4 files changed, 0 insertions, 70 deletions
@@ -24,13 +24,6 @@ New functions to implement: mpc_fma: d=a*b+c - from Andreas Enge 9 April 2008: mpc_pow_ui - - from Andreas Enge 9 April 2008: - depending on a preprocessor variable (DEBUG or MPC_LOG), add - logging: For each function call, output arguments and precision, and - the successive precisions in the main loop; allows to test with - real world data whether we hit corner cases - possibly: mpc_write and mpc_read that serialises mpc objects (output in - base 16 together with the precision of the variable) - from Andreas Enge and Philippe Théveny 17 July 2008 agm (and complex logarithm with agm ?) diff --git a/configure.ac b/configure.ac index 05070b6..2b2e911 100644 --- a/configure.ac +++ b/configure.ac @@ -71,18 +71,6 @@ AC_ARG_WITH([gmp], AC_MSG_FAILURE([Do not use --with-gmp and --with-gmp-include/--with-gmp-lib options simultaneously.]) fi ]) -AC_ARG_VAR([MPC_USE_LOGGING], [defined if logging support wanted]) -AC_ARG_ENABLE([logging], - [AC_HELP_STRING([--enable-logging], - [enable MPC logging [default=no]])], - [ - case $enableval in - yes) AC_DEFINE([MPC_USE_LOGGING],1,[Logging support]) ;; - no) ;; - *) AC_MSG_ERROR([bad value for --enable-logging: yes or no]) - ;; - esac - ]) dnl dnl Setup CC and CFLAGS diff --git a/src/mpc-impl.h b/src/mpc-impl.h index 626fcd0..385f3ac 100644 --- a/src/mpc-impl.h +++ b/src/mpc-impl.h @@ -118,48 +118,6 @@ do { \ /* - * Logging macros - */ - -#ifdef MPC_USE_LOGGING - -#define MPC_LOG_VAR(x) \ - do { \ - if (getenv ("MPC_LOG") != NULL) \ - { \ - printf ("%s.%d:", __func__, __LINE__); \ - OUT (x); \ - } \ - } while (0) -#define MPC_LOG_RND(r) \ - do { \ - if (getenv ("MPC_LOG") != NULL) \ - { \ - printf ("%s.%d: rounding_mode [%s, %s]\n", \ - __func__, __LINE__, \ - mpfr_print_rnd_mode (MPC_RND_RE(r)), \ - mpfr_print_rnd_mode (MPC_RND_IM(r))); \ - } \ - } while (0) -/* use the same trick as in MPFR so as to allow MPC to be compiled with a C89 - compiler (variable argument list macros are C99). */ -#define MPC_LOG_MSG2(format, ...) \ - do { \ - if (getenv("MPC_LOG") != NULL) \ - printf ("%s.%d:"format"\n", __func__, __LINE__, __VA_ARGS__); \ - } while (0) -#define MPC_LOG_MSG(x) MPC_LOG_MSG2 x - -#else /* MPC_USE_LOGGING */ - -#define MPC_LOG_VAR(x) -#define MPC_LOG_RND(r) -#define MPC_LOG_MSG(x) - -#endif /* MPC_USE_LOGGING */ - - -/* * Define internal functions */ @@ -172,9 +172,6 @@ mpc_tan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) see proof in algorithms.tex. */ - MPC_LOG_VAR (op); - MPC_LOG_RND (rnd); - prec = MPC_MAX_PREC(rop); mpc_init2 (x, 2); @@ -194,8 +191,6 @@ mpc_tan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) mpc_set_prec (x, prec); mpc_set_prec (y, prec); - MPC_LOG_MSG (("loop prec=%ld", prec)); - /* rounding away from zero: except in the cases x=0 or y=0 (processed above), sin x and cos y are never exact, so rounding away from 0 is rounding towards 0 and adding one ulp to the absolute value */ @@ -252,15 +247,11 @@ mpc_tan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd) || mpfr_can_round (MPC_IM(x), prec - 6, GMP_RNDN, GMP_RNDZ, MPFR_PREC(MPC_IM(rop)) + (MPC_RND_IM(rnd) == GMP_RNDN)); } - MPC_LOG_MSG (("err: %ld", err)); - MPC_LOG_VAR (x); } while (ok == 0); inex = mpc_set (rop, x, rnd); - MPC_LOG_VAR (rop); - mpc_clear (x); mpc_clear (y); |