diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mpc-impl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mpc-impl.h b/src/mpc-impl.h index c3ca9af..b2aaa90 100644 --- a/src/mpc-impl.h +++ b/src/mpc-impl.h @@ -137,6 +137,27 @@ __MPC_DECLSPEC int mpfr_regular_p (mpfr_srcptr); } while (0) #endif + +/* + * Debug macros + */ + +#define MPC_OUT(x) \ +do { \ + printf (#x "[%lu,%lu]=", (unsigned long int) MPC_PREC_RE (x), \ + (unsigned long int) MPC_PREC_IM (x)); \ + mpc_out_str (stdout, 2, 0, x, MPC_RNDNN); \ + printf ("\n"); \ +} while (0) + +#define MPFR_OUT(x) \ +do { \ + printf (#x "[%lu]=", (unsigned long int) mpfr_get_prec (x)); \ + mpfr_out_str (stdout, 2, 0, x, GMP_RNDN); \ + printf ("\n"); \ +} while (0) + + /* * Constants */ |