From 7a9011ba5b38de2496079f590362cd2a80c60da3 Mon Sep 17 00:00:00 2001 From: enge Date: Mon, 23 Jul 2012 12:24:50 +0000 Subject: changed GMP_RND? to MPFR_RND? git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1246 211d60ee-9f03-0410-a15a-8952a2c7a4e4 --- tests/mpc-tests.h | 2 +- tests/random.c | 10 +++--- tests/read_data.c | 22 ++++++------ tests/tadd_fr.c | 2 +- tests/tatan.c | 8 ++--- tests/tcos.c | 10 +++--- tests/tcosh.c | 10 +++--- tests/tgeneric.c | 100 +++++++++++++++++++++++++++--------------------------- tests/tmul.c | 16 ++++----- tests/tmul_i.c | 10 +++--- tests/tnorm.c | 18 +++++----- tests/tpow.c | 6 ++-- tests/tpow_fr.c | 4 +-- tests/tpow_ui.c | 8 ++--- tests/treimref.c | 10 +++--- tests/tset.c | 28 +++++++-------- tests/tsqr.c | 8 ++--- tests/ttan.c | 46 ++++++++++++------------- tests/tui_div.c | 6 ++-- 19 files changed, 162 insertions(+), 162 deletions(-) (limited to 'tests') diff --git a/tests/mpc-tests.h b/tests/mpc-tests.h index d1ce586..fe3e452 100644 --- a/tests/mpc-tests.h +++ b/tests/mpc-tests.h @@ -65,7 +65,7 @@ do { \ #define MPFR_OUT(x) \ do { \ printf (#x "[%lu]=", (unsigned long int) mpfr_get_prec (x)); \ - mpfr_out_str (stdout, 2, 0, x, GMP_RNDN); \ + mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN); \ printf ("\n"); \ } while (0) diff --git a/tests/random.c b/tests/random.c index aa06355..0730fee 100644 --- a/tests/random.c +++ b/tests/random.c @@ -1,6 +1,6 @@ /* random.c -- Handle seed for random numbers. -// Copyright (C) 2008, 2009, 2010, 2011 INRIA +// Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -140,9 +140,9 @@ test_default_random (mpc_ptr z, mpfr_exp_t emin, mpfr_exp_t emax, zero_im_p = !zero_re_p; } if (zero_re_p) - mpfr_set_ui (mpc_realref (z), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z), 0, MPFR_RNDN); if (zero_im_p) - mpfr_set_ui (mpc_imagref (z), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z), 0, MPFR_RNDN); } if (!mpfr_zero_p (mpc_realref (z))) mpfr_set_exp (mpc_realref (z), (mpfr_exp_t) gmp_urandomm_ui (rands, range) + emin); @@ -154,7 +154,7 @@ test_default_random (mpc_ptr z, mpfr_exp_t emin, mpfr_exp_t emax, negative_probability = 256; r = gmp_urandomb_ui (rands, 16); if ((r & 0xFF) < negative_probability) - mpfr_neg (mpc_realref (z), mpc_realref (z), GMP_RNDN); + mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN); if (((r>>8) & 0xFF) < negative_probability) - mpfr_neg (mpc_imagref (z), mpc_imagref (z), GMP_RNDN); + mpfr_neg (mpc_imagref (z), mpc_imagref (z), MPFR_RNDN); } diff --git a/tests/read_data.c b/tests/read_data.c index 7f3d91f..c1cf677 100644 --- a/tests/read_data.c +++ b/tests/read_data.c @@ -41,7 +41,7 @@ int nextchar; : (inex) == -1 ? "-1" : "0" static const char *mpfr_rnd_mode [] = - { "GMP_RNDN", "GMP_RNDZ", "GMP_RNDU", "GMP_RNDD" }; + { "MPFR_RNDN", "MPFR_RNDZ", "MPFR_RNDU", "MPFR_RNDD" }; const char *rnd_mode[] = { "MPC_RNDNN", "MPC_RNDZN", "MPC_RNDUN", "MPC_RNDDN", @@ -238,16 +238,16 @@ read_mpfr_rounding_mode (FILE *fp, mpfr_rnd_t* rnd) switch (nextchar) { case 'n': case 'N': - *rnd = GMP_RNDN; + *rnd = MPFR_RNDN; break; case 'z': case 'Z': - *rnd = GMP_RNDZ; + *rnd = MPFR_RNDZ; break; case 'u': case 'U': - *rnd = GMP_RNDU; + *rnd = MPFR_RNDU; break; case 'd': case 'D': - *rnd = GMP_RNDD; + *rnd = MPFR_RNDD; break; default: printf ("Error: Unexpected rounding mode '%c' in file '%s' line %lu\n", @@ -382,7 +382,7 @@ read_mpfr_mantissa (FILE *fp, mpfr_ptr x) exit (1); } ungetc (nextchar, fp); - if (mpfr_inp_str (x, fp, 0, GMP_RNDN) == 0) { + if (mpfr_inp_str (x, fp, 0, MPFR_RNDN) == 0) { printf ("Error: Impossible to read mpfr mantissa " "in file '%s' line %lu\n", pathname, line_number); @@ -419,10 +419,10 @@ read_mpc (FILE *fp, mpc_ptr z, known_signs_t *ks) static void check_compatible (int inex, mpfr_t expected, mpfr_rnd_t rnd, const char *s) { - if ((rnd == GMP_RNDU && inex == -1) || - (rnd == GMP_RNDD && inex == +1) || - (rnd == GMP_RNDZ && !mpfr_signbit (expected) && inex == +1) || - (rnd == GMP_RNDZ && mpfr_signbit (expected) && inex == -1)) + if ((rnd == MPFR_RNDU && inex == -1) || + (rnd == MPFR_RNDD && inex == +1) || + (rnd == MPFR_RNDZ && !mpfr_signbit (expected) && inex == +1) || + (rnd == MPFR_RNDZ && mpfr_signbit (expected) && inex == -1)) { if (s != NULL) printf ("Incompatible ternary value '%c' (%s part) in file '%s' line %lu\n", @@ -657,7 +657,7 @@ data_check (mpc_function function, const char *file_name) int inex_re; mpfr_t x1, x2; - mpfr_rnd_t mpfr_rnd = GMP_RNDN; + mpfr_rnd_t mpfr_rnd = MPFR_RNDN; int sign_real; int inex_im; diff --git a/tests/tadd_fr.c b/tests/tadd_fr.c index 1f3b76a..0f1a5cf 100644 --- a/tests/tadd_fr.c +++ b/tests/tadd_fr.c @@ -37,7 +37,7 @@ check_ternary_value (mpfr_prec_t prec_max, mpfr_prec_t step) mpfr_set_prec (f, prec); mpc_set_ui (z, 1, MPC_RNDNN); - mpfr_set_ui (f, 1, GMP_RNDN); + mpfr_set_ui (f, 1, MPFR_RNDN); if (mpc_add_fr (z, z, f, MPC_RNDNZ)) { printf ("Error in mpc_add_fr: 1+1 should be exact\n"); diff --git a/tests/tatan.c b/tests/tatan.c index 8883588..ca93ec4 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -30,10 +30,10 @@ test_underflow (void) mpfr_set_emin (-10); mpc_init2 (z, 21); - mpfr_set_si (mpc_realref(z), -1, GMP_RNDZ); - mpfr_set_ui_2exp (mpc_imagref(z), 1, 20, GMP_RNDZ); - mpfr_add_ui (mpc_imagref(z), mpc_imagref(z), 1, GMP_RNDZ); - mpfr_div_2exp (mpc_imagref(z), mpc_imagref(z), 20, GMP_RNDZ); + mpfr_set_si (mpc_realref(z), -1, MPFR_RNDZ); + mpfr_set_ui_2exp (mpc_imagref(z), 1, 20, MPFR_RNDZ); + mpfr_add_ui (mpc_imagref(z), mpc_imagref(z), 1, MPFR_RNDZ); + mpfr_div_2exp (mpc_imagref(z), mpc_imagref(z), 20, MPFR_RNDZ); mpc_atan (z, z, MPC_RNDNN); if (mpfr_cmp_si_2exp (mpc_realref(z), -1066635, 20) != 0 || mpfr_cmp_si_2exp (mpc_imagref(z), 1687619, 22)) diff --git a/tests/tcos.c b/tests/tcos.c index 66a85ba..dafc01d 100644 --- a/tests/tcos.c +++ b/tests/tcos.c @@ -1,6 +1,6 @@ /* tcos -- test file for mpc_cos. -Copyright (C) 2008, 2009, 2011 INRIA +Copyright (C) 2008, 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -30,13 +30,13 @@ bug20090105 (void) mpc_init2 (got, 324); mpfr_set_str (mpc_realref(op), "-3.f1813b1487372434fea4414a520f65a343a16d0ec1ffb" - "b2b880154db8d63377ce788fc4215c450300@1", 16, GMP_RNDN); + "b2b880154db8d63377ce788fc4215c450300@1", 16, MPFR_RNDN); mpfr_set_str (mpc_imagref(op), "-2.b7a0c80bcacf1ccbbac614bf53a58b672b1b503161bee" - "59a82e46a23570b652f7ba5f01ef766d1c50", 16,GMP_RNDN); + "59a82e46a23570b652f7ba5f01ef766d1c50", 16,MPFR_RNDN); mpfr_set_str (mpc_realref(expected), "7.57c5b08a2b11b660d906a354289b0724b9c4b237" - "95abe33424e8d9858e534bd5d776ddd18e34b0240", 16, GMP_RNDN); + "95abe33424e8d9858e534bd5d776ddd18e34b0240", 16, MPFR_RNDN); mpfr_set_str (mpc_imagref(expected), "-1.f41a389646d068e0263561cb3c5d1df763945ad" - "ed9339f2a98387a3c4f97dbfd8a08b7d0af2f11b46", 16,GMP_RNDN); + "ed9339f2a98387a3c4f97dbfd8a08b7d0af2f11b46", 16,MPFR_RNDN); mpc_cos (got, op, MPC_RNDNN); if (mpc_cmp (got, expected) != 0) diff --git a/tests/tcosh.c b/tests/tcosh.c index 57b5601..0d6a9da 100644 --- a/tests/tcosh.c +++ b/tests/tcosh.c @@ -1,6 +1,6 @@ /* test file for mpc_cosh. -Copyright (C) 2008, 2009, 2010, 2011 INRIA +Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -38,8 +38,8 @@ pure_real_argument (void) /* cosh(1 +i*0) = cosh(1) +i*0 */ mpc_set_ui_ui (z, 1, 0, MPC_RNDNN); - mpfr_cosh (mpc_realref (u), mpc_realref (z), GMP_RNDN); - mpfr_set_ui (mpc_imagref (u), 0, GMP_RNDN); + mpfr_cosh (mpc_realref (u), mpc_realref (z), MPFR_RNDN); + mpfr_set_ui (mpc_imagref (u), 0, MPFR_RNDN); mpc_cosh (cosh_z, z, MPC_RNDNN); if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z))) TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN); @@ -84,8 +84,8 @@ pure_imaginary_argument (void) /* cosh(+0 +i) = cos(1) + i*0 */ mpc_set_ui_ui (z, 0, 1, MPC_RNDNN); - mpfr_cos (mpc_realref (u), mpc_imagref (z), GMP_RNDN); - mpfr_set_ui (mpc_imagref (u), 0, GMP_RNDN); + mpfr_cos (mpc_realref (u), mpc_imagref (z), MPFR_RNDN); + mpfr_set_ui (mpc_imagref (u), 0, MPFR_RNDN); mpc_cosh (cosh_z, z, MPC_RNDNN); if (mpc_cmp (cosh_z, u) != 0 || mpfr_signbit (mpc_imagref (cosh_z))) TEST_FAILED ("mpc_cosh", z, cosh_z, u, MPC_RNDNN); diff --git a/tests/tgeneric.c b/tests/tgeneric.c index a2bb460..cf56997 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -25,7 +25,7 @@ along with this program. If not, see http://www.gnu.org/licenses/ . #define MPFR_CAN_ROUND(b,err,prec,rnd) \ (mpfr_zero_p (b) || mpfr_inf_p (b) \ || mpfr_can_round (b, (long)mpfr_get_prec (b) - (err), (rnd), \ - GMP_RNDZ, (prec) + ((rnd)==GMP_RNDN))) + MPFR_RNDZ, (prec) + ((rnd)==MPFR_RNDN))) /* functions with one input, one output */ static void @@ -563,8 +563,8 @@ static void reuse_fc (mpc_function* function, mpc_ptr z, mpc_ptr x, mpfr_ptr expected) { mpc_set (x, z, MPC_RNDNN); /* exact */ - function->pointer.FC (expected, z, GMP_RNDN); - function->pointer.FC (mpc_realref (x), x, GMP_RNDN); + function->pointer.FC (expected, z, MPFR_RNDN); + function->pointer.FC (mpc_realref (x), x, MPFR_RNDN); if (!same_mpfr_value (mpc_realref (x), expected, 1)) { mpfr_t got; @@ -577,7 +577,7 @@ reuse_fc (mpc_function* function, mpc_ptr z, mpc_ptr x, mpfr_ptr expected) exit (1); } mpc_set (x, z, MPC_RNDNN); /* exact */ - function->pointer.FC (mpc_imagref (x), x, GMP_RNDN); + function->pointer.FC (mpc_imagref (x), x, MPFR_RNDN); if (!same_mpfr_value (mpc_imagref (x), expected, 1)) { mpfr_t got; @@ -856,7 +856,7 @@ reuse_cuuc (mpc_function* function, unsigned long ul1, unsigned long ul2, static mpfr_rnd_t first_rnd_mode (void) { - return GMP_RNDN; + return MPFR_RNDN; } static mpfr_rnd_t @@ -865,16 +865,16 @@ next_rnd_mode (mpfr_rnd_t curr) when curr is the last rounding mode */ { switch (curr) { - case GMP_RNDN: - return GMP_RNDZ; - case GMP_RNDZ: - return GMP_RNDU; - case GMP_RNDU: - return GMP_RNDD; + case MPFR_RNDN: + return MPFR_RNDZ; + case MPFR_RNDZ: + return MPFR_RNDU; + case MPFR_RNDU: + return MPFR_RNDD; default: /* return invalid guard value in mpfr_rnd_t */ #if MPFR_VERSION_MAJOR < 3 - return GMP_RNDNA; + return MPFR_RNDNA; #else return MPFR_RNDA; /* valid rounding type, but not (yet) used in mpc */ #endif @@ -885,8 +885,8 @@ static int is_valid_rnd_mode (mpfr_rnd_t curr) /* returns 1 if curr is a valid rounding mode, and 0otherwise */ { - if ( curr == GMP_RNDN || curr == GMP_RNDZ - || curr == GMP_RNDU || curr == GMP_RNDD) + if ( curr == MPFR_RNDN || curr == MPFR_RNDZ + || curr == MPFR_RNDU || curr == MPFR_RNDD) return 1; else return 0; @@ -1010,25 +1010,25 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); break; case 5: - mpfr_set_ui (mpc_realref (z2), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z2), 0, MPFR_RNDN); break; case 6: mpfr_set_inf (mpc_realref (z2), -1); break; case 7: - mpfr_set_ui (mpc_imagref (z2), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z2), 0, MPFR_RNDN); break; case 8: mpfr_set_inf (mpc_imagref (z2), +1); @@ -1045,25 +1045,25 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); break; case 5: - mpfr_set_ui (mpc_realref (z2), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z2), 0, MPFR_RNDN); break; case 6: mpfr_set_inf (mpc_realref (z2), -1); break; case 7: - mpfr_set_ui (mpc_imagref (z2), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z2), 0, MPFR_RNDN); break; case 8: mpfr_set_inf (mpc_imagref (z2), +1); @@ -1078,13 +1078,13 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1095,21 +1095,21 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, mpc_set_prec (z2, 128); do { test_default_random (z2, 0, 64, 128, zero_probability); - } while (!mpfr_fits_ulong_p (mpc_realref (z2), GMP_RNDN)); - ul1 = mpfr_get_ui (mpc_realref(z2), GMP_RNDN); + } while (!mpfr_fits_ulong_p (mpc_realref (z2), MPFR_RNDN)); + ul1 = mpfr_get_ui (mpc_realref(z2), MPFR_RNDN); mpc_set_prec (z2, prec); mpc_set_prec (z3, prec); mpc_set_prec (zzzz, 4*prec); switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1123,23 +1123,23 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, mpc_set_prec (z2, 128); do { test_default_random (z2, 0, 64, 128, zero_probability); - } while (!mpfr_fits_ulong_p (mpc_realref (z2), GMP_RNDN) - ||!mpfr_fits_ulong_p (mpc_imagref (z2), GMP_RNDN)); - ul1 = mpfr_get_ui (mpc_realref(z2), GMP_RNDN); - ul2 = mpfr_get_ui (mpc_imagref(z2), GMP_RNDN); + } while (!mpfr_fits_ulong_p (mpc_realref (z2), MPFR_RNDN) + ||!mpfr_fits_ulong_p (mpc_imagref (z2), MPFR_RNDN)); + ul1 = mpfr_get_ui (mpc_realref(z2), MPFR_RNDN); + ul2 = mpfr_get_ui (mpc_imagref(z2), MPFR_RNDN); mpc_set_prec (z2, prec); mpc_set_prec (z3, prec); mpc_set_prec (zzzz, 4*prec); switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1156,21 +1156,21 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, mpc_set_prec (z2, 128); do { test_default_random (z2, 0, 64, 128, zero_probability); - } while (!mpfr_fits_slong_p (mpc_realref (z2), GMP_RNDN)); - lo = mpfr_get_si (mpc_realref(z2), GMP_RNDN); + } while (!mpfr_fits_slong_p (mpc_realref (z2), MPFR_RNDN)); + lo = mpfr_get_si (mpc_realref(z2), MPFR_RNDN); mpc_set_prec (z2, prec); mpc_set_prec (z3, prec); mpc_set_prec (zzzz, 4*prec); switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1184,21 +1184,21 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, mpc_set_prec (z2, 128); do { test_default_random (z2, 0, 64, 128, zero_probability); - } while (!mpfr_fits_slong_p (mpc_realref (z2), GMP_RNDN)); - i = (int)mpfr_get_si (mpc_realref(z2), GMP_RNDN); + } while (!mpfr_fits_slong_p (mpc_realref (z2), MPFR_RNDN)); + i = (int)mpfr_get_si (mpc_realref(z2), MPFR_RNDN); mpc_set_prec (z2, prec); mpc_set_prec (z3, prec); mpc_set_prec (zzzz, 4*prec); switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1210,7 +1210,7 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, break; case CCF: case CFC: mpfr_set_prec (x1, prec); - mpfr_set (x1, mpc_realref (z1), GMP_RNDN); + mpfr_set (x1, mpc_realref (z1), MPFR_RNDN); test_default_random (z1, exp_min, exp_max, 128, zero_probability); mpc_set_prec (z2, prec); mpc_set_prec (z3, prec); @@ -1218,19 +1218,19 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); break; case 5: - mpfr_set_ui (x1, 0, GMP_RNDN); + mpfr_set_ui (x1, 0, MPFR_RNDN); break; case 6: mpfr_set_inf (x1, +1); @@ -1247,13 +1247,13 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); @@ -1268,13 +1268,13 @@ tgeneric (mpc_function function, mpfr_prec_t prec_min, switch (special) { case 1: - mpfr_set_ui (mpc_realref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_realref (z1), 0, MPFR_RNDN); break; case 2: mpfr_set_inf (mpc_realref (z1), +1); break; case 3: - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); break; case 4: mpfr_set_inf (mpc_imagref (z1), -1); diff --git a/tests/tmul.c b/tests/tmul.c index 46d3bb3..225cf0e 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -102,15 +102,15 @@ check_regular (void) imaginary part */ mpc_set_prec (x, 7); mpc_set_prec (y, 7); - mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, GMP_RNDN); - mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, GMP_RNDN); - mpfr_set_str (mpc_realref (y), "0xECp-146", 16, GMP_RNDN); - mpfr_set_str (mpc_imagref (y), "0xACp-471", 16, GMP_RNDN); + mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, MPFR_RNDN); + mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, MPFR_RNDN); + mpfr_set_str (mpc_realref (y), "0xECp-146", 16, MPFR_RNDN); + mpfr_set_str (mpc_imagref (y), "0xACp-471", 16, MPFR_RNDN); cmpmul (x, y, MPC_RNDNN); - mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, GMP_RNDN); - mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, GMP_RNDN); - mpfr_set_str (mpc_realref (y), "0xACp-471", 16, GMP_RNDN); - mpfr_set_str (mpc_imagref (y), "-0xECp-146", 16, GMP_RNDN); + mpfr_set_str (mpc_realref (x), "0xB4p+733", 16, MPFR_RNDN); + mpfr_set_str (mpc_imagref (x), "0x90p+244", 16, MPFR_RNDN); + mpfr_set_str (mpc_realref (y), "0xACp-471", 16, MPFR_RNDN); + mpfr_set_str (mpc_imagref (y), "-0xECp-146", 16, MPFR_RNDN); cmpmul (x, y, MPC_RNDNN); for (prec = 2; prec < 1000; prec = (mpfr_prec_t) (prec * 1.1 + 1)) diff --git a/tests/tmul_i.c b/tests/tmul_i.c index 3cde4ac..863ed5f 100644 --- a/tests/tmul_i.c +++ b/tests/tmul_i.c @@ -1,6 +1,6 @@ /* tmul_i -- test file for mpc_mul_i. -Copyright (C) 2008, 2009, 2010, 2011 INRIA +Copyright (C) 2008, 2009, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -36,10 +36,10 @@ check_different_precisions(void) mpfr_set_prec (mpc_imagref (expected), 32); mpfr_set_prec (mpc_imagref (got), 32); - mpfr_set_str (mpc_realref (z), "0x100000000fp-32", 16, GMP_RNDN); - mpfr_set_str (mpc_imagref (z), "-1", 2, GMP_RNDN); - mpfr_set_str (mpc_realref (expected), "+1", 2, GMP_RNDN); - mpfr_set_str (mpc_imagref (expected), "0x100000000fp-32", 16, GMP_RNDN); + mpfr_set_str (mpc_realref (z), "0x100000000fp-32", 16, MPFR_RNDN); + mpfr_set_str (mpc_imagref (z), "-1", 2, MPFR_RNDN); + mpfr_set_str (mpc_realref (expected), "+1", 2, MPFR_RNDN); + mpfr_set_str (mpc_imagref (expected), "0x100000000fp-32", 16, MPFR_RNDN); mpc_set (got, z, MPC_RNDNN); res = mpc_mul_i (got, got, +1, MPC_RNDNN); diff --git a/tests/tnorm.c b/tests/tnorm.c index 3f4dccd..1dba939 100644 --- a/tests/tnorm.c +++ b/tests/tnorm.c @@ -1,6 +1,6 @@ /* tnorm -- test file for mpc_norm. -Copyright (C) 2008, 2011 INRIA +Copyright (C) 2008, 2011, 2012 INRIA This file is part of GNU MPC. @@ -30,11 +30,11 @@ test_underflow (void) mpfr_set_emin (-1); /* smallest positive number is 0.5*2^emin = 0.25 */ mpc_init2 (z, 10); - mpfr_set_ui_2exp (mpc_realref (z), 1023, -11, GMP_RNDN); /* exact */ - mpfr_set_ui_2exp (mpc_imagref (z), 1023, -11, GMP_RNDN); /* exact */ + mpfr_set_ui_2exp (mpc_realref (z), 1023, -11, MPFR_RNDN); /* exact */ + mpfr_set_ui_2exp (mpc_imagref (z), 1023, -11, MPFR_RNDN); /* exact */ mpfr_init2 (f, 10); - inex = mpc_norm (f, z, GMP_RNDZ); /* should give 511/1024 */ + inex = mpc_norm (f, z, MPFR_RNDZ); /* should give 511/1024 */ if (inex >= 0) { printf ("Error in underflow case (1)\n"); @@ -47,12 +47,12 @@ test_underflow (void) printf ("got "); mpfr_dump (f); printf ("expected "); - mpfr_set_ui_2exp (f, 511, -10, GMP_RNDZ); + mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ); mpfr_dump (f); exit (1); } - inex = mpc_norm (f, z, GMP_RNDN); /* should give 511/1024 */ + inex = mpc_norm (f, z, MPFR_RNDN); /* should give 511/1024 */ if (inex >= 0) { printf ("Error in underflow case (2)\n"); @@ -65,12 +65,12 @@ test_underflow (void) printf ("got "); mpfr_dump (f); printf ("expected "); - mpfr_set_ui_2exp (f, 511, -10, GMP_RNDZ); + mpfr_set_ui_2exp (f, 511, -10, MPFR_RNDZ); mpfr_dump (f); exit (1); } - inex = mpc_norm (f, z, GMP_RNDU); /* should give 1023/2048 */ + inex = mpc_norm (f, z, MPFR_RNDU); /* should give 1023/2048 */ if (inex <= 0) { printf ("Error in underflow case (3)\n"); @@ -83,7 +83,7 @@ test_underflow (void) printf ("got "); mpfr_dump (f); printf ("expected "); - mpfr_set_ui_2exp (f, 1023, -11, GMP_RNDZ); + mpfr_set_ui_2exp (f, 1023, -11, MPFR_RNDZ); mpfr_dump (f); exit (1); } diff --git a/tests/tpow.c b/tests/tpow.c index 3592209..31ac1ca 100644 --- a/tests/tpow.c +++ b/tests/tpow.c @@ -1,6 +1,6 @@ /* tpow -- test file for mpc_pow. -Copyright (C) 2009, 2011 INRIA +Copyright (C) 2009, 2011, 2012 INRIA This file is part of GNU MPC. @@ -34,8 +34,8 @@ reuse_bug (void) mpc_init2 (y, prec); mpc_init2 (z, prec); - mpfr_set_ui (mpc_realref (x), 0ul, GMP_RNDN); - mpfr_set_ui_2exp (mpc_imagref (x), 3ul, -2, GMP_RNDN); + mpfr_set_ui (mpc_realref (x), 0ul, MPFR_RNDN); + mpfr_set_ui_2exp (mpc_imagref (x), 3ul, -2, MPFR_RNDN); mpc_set_ui (y, 8ul, MPC_RNDNN); mpc_pow (z, x, y, MPC_RNDNN); diff --git a/tests/tpow_fr.c b/tests/tpow_fr.c index 47ef071..99274af 100644 --- a/tests/tpow_fr.c +++ b/tests/tpow_fr.c @@ -30,9 +30,9 @@ test_reuse (void) mpfr_init2 (y, 2); mpc_init2 (z, 2); mpc_set_si_si (z, 0, -1, MPC_RNDNN); - mpfr_neg (mpc_realref (z), mpc_realref (z), GMP_RNDN); + mpfr_neg (mpc_realref (z), mpc_realref (z), MPFR_RNDN); mpc_div_2ui (z, z, 4, MPC_RNDNN); - mpfr_set_ui (y, 512, GMP_RNDN); + mpfr_set_ui (y, 512, MPFR_RNDN); inex = mpc_pow_fr (z, z, y, MPC_RNDNN); if (MPC_INEX_RE(inex) != 0 || MPC_INEX_IM(inex) != 0 || mpfr_cmp_ui_2exp (mpc_realref(z), 1, -2048) != 0 || diff --git a/tests/tpow_ui.c b/tests/tpow_ui.c index 4e8cd31..1c7cc6b 100644 --- a/tests/tpow_ui.c +++ b/tests/tpow_ui.c @@ -1,6 +1,6 @@ /* tpow_ui -- test file for mpc_pow_ui. -Copyright (C) 2009, 2010 INRIA +Copyright (C) 2009, 2010, 2012 INRIA This file is part of GNU MPC. @@ -97,9 +97,9 @@ main (int argc, char *argv[]) MPC_ASSERT (k >= 0); mpc_init2 (z, p); mpc_init2 (res, p); - mpfr_const_pi (mpc_realref (z), GMP_RNDN); - mpfr_div_2exp (mpc_realref (z), mpc_realref (z), 2, GMP_RNDN); - mpfr_const_log2 (mpc_imagref (z), GMP_RNDN); + mpfr_const_pi (mpc_realref (z), MPFR_RNDN); + mpfr_div_2exp (mpc_realref (z), mpc_realref (z), 2, MPFR_RNDN); + mpfr_const_log2 (mpc_imagref (z), MPFR_RNDN); while (k--) mpc_pow_ui (res, z, (unsigned long int) n, MPC_RNDNN); mpc_clear (z); diff --git a/tests/treimref.c b/tests/treimref.c index 230d34c..9d3c75c 100644 --- a/tests/treimref.c +++ b/tests/treimref.c @@ -1,6 +1,6 @@ /* treimref -- test file for mpc_realref and mpc_imagref. -Copyright (C) 2009 INRIA +Copyright (C) 2009, 2012 INRIA This file is part of GNU MPC. @@ -30,14 +30,14 @@ main (void) mpc_init2 (z, 6); mpc_set_ui_ui (z, 17, 42, MPC_RNDNN); - mpfr_set_ui (mpc_realref (z), 18, GMP_RNDN); - if (mpfr_get_ui (mpc_realref (z), GMP_RNDN) != 18) + mpfr_set_ui (mpc_realref (z), 18, MPFR_RNDN); + if (mpfr_get_ui (mpc_realref (z), MPFR_RNDN) != 18) { fprintf (stderr, "Error in mpfr_set_ui/mpc_realref\n"); exit (1); } - mpfr_set_ui (mpc_imagref (z), 43, GMP_RNDN); - if (mpfr_get_ui (mpc_imagref (z), GMP_RNDN) != 43) + mpfr_set_ui (mpc_imagref (z), 43, MPFR_RNDN); + if (mpfr_get_ui (mpc_imagref (z), MPFR_RNDN) != 43) { fprintf (stderr, "Error in mpfr_set_ui/mpc_imagref\n"); exit (1); diff --git a/tests/tset.c b/tests/tset.c index 0049436..27ea0b3 100644 --- a/tests/tset.c +++ b/tests/tset.c @@ -1,6 +1,6 @@ /* tset -- Test file for mpc_set_x and mpc_set_x_x functions. -Copyright (C) 2009, 2010, 2011 INRIA +Copyright (C) 2009, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -92,7 +92,7 @@ check_set (void) lo = -prec; - mpfr_set_d (fr, 1.23456789, GMP_RNDN); + mpfr_set_d (fr, 1.23456789, MPFR_RNDN); mpc_set_d (z, 1.23456789, MPC_RNDNN); if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp_si (mpc_imagref(z), 0) != 0) @@ -117,7 +117,7 @@ check_set (void) if (mpfr_cmp_si (mpc_realref(z), lo) != 0 || mpfr_cmp_ui (mpc_imagref(z), 0) != 0) PRINT_ERROR ("mpc_set_si", prec, z); - mpfr_set_ld (fr, 1.23456789L, GMP_RNDN); + mpfr_set_ld (fr, 1.23456789L, MPFR_RNDN); mpc_set_ld_ld (z, 1.23456789L, 1.23456789L, MPC_RNDNN); if (mpfr_cmp (mpc_realref(z), fr) != 0 || mpfr_cmp (mpc_imagref(z), fr) != 0) @@ -141,10 +141,10 @@ check_set (void) PRINT_ERROR ("mpc_set_ld", prec, z); mpc_set_prec (x, prec); - mpfr_set_ui(fr, 1, GMP_RNDN); - mpfr_div_ui(fr, fr, 3, GMP_RNDN); - mpfr_set(mpc_realref(x), fr, GMP_RNDN); - mpfr_set(mpc_imagref(x), fr, GMP_RNDN); + mpfr_set_ui(fr, 1, MPFR_RNDN); + mpfr_div_ui(fr, fr, 3, MPFR_RNDN); + mpfr_set(mpc_realref(x), fr, MPFR_RNDN); + mpfr_set(mpc_imagref(x), fr, MPFR_RNDN); mpc_set (z, x, MPC_RNDNN); mpfr_clear_flags (); /* mpc_cmp set erange flag when an operand is a @@ -170,7 +170,7 @@ check_set (void) || mpfr_erangeflag_p()) PRINT_ERROR ("mpc_set_fr", prec, z); - mpfr_set_z (fr, mpz, GMP_RNDN); + mpfr_set_z (fr, mpz, MPFR_RNDN); mpc_set_z_z (z, mpz, mpz, MPC_RNDNN); mpfr_clear_flags (); if (mpfr_cmp (mpc_realref(z), fr) != 0 @@ -192,7 +192,7 @@ check_set (void) || mpfr_erangeflag_p()) PRINT_ERROR ("mpc_set_z", prec, z); - mpfr_set_q (fr, mpq, GMP_RNDN); + mpfr_set_q (fr, mpq, MPFR_RNDN); mpc_set_q_q (z, mpq, mpq, MPC_RNDNN); mpfr_clear_flags (); if (mpfr_cmp (mpc_realref(z), fr) != 0 @@ -221,7 +221,7 @@ check_set (void) || mpfr_erangeflag_p()) PRINT_ERROR ("mpc_set_q", prec, z); - mpfr_set_f (fr, mpf, GMP_RNDN); + mpfr_set_f (fr, mpf, MPFR_RNDN); mpc_set_f_f (z, mpf, mpf, MPC_RNDNN); mpfr_clear_flags (); if (mpfr_cmp (mpc_realref(z), fr) != 0 @@ -277,13 +277,13 @@ check_set (void) im = 2 * im * im + 4 * im + 1; /* gives 2^(2n-1)-1 from 2^(n-1)-1 */ mpc_set_sj (z, im, MPC_RNDNN); - if (mpfr_get_sj (mpc_realref(z), GMP_RNDN) != im || + if (mpfr_get_sj (mpc_realref(z), MPFR_RNDN) != im || mpfr_cmp_ui (mpc_imagref(z), 0) != 0) PRINT_ERROR ("mpc_set_sj (2)", im, z); mpc_set_sj_sj (z, im, im, MPC_RNDNN); - if (mpfr_get_sj (mpc_realref(z), GMP_RNDN) != im || - mpfr_get_sj (mpc_imagref(z), GMP_RNDN) != im) + if (mpfr_get_sj (mpc_realref(z), MPFR_RNDN) != im || + mpfr_get_sj (mpc_imagref(z), MPFR_RNDN) != im) PRINT_ERROR ("mpc_set_sj_sj (2)", im, z); } #endif /* _MPC_H_HAVE_INTMAX_T */ @@ -408,7 +408,7 @@ check_set_str (mpfr_exp_t exp_max) /* the real part has a zero exponent in base ten (fixed in r439) */ mpc_set_prec (expected, 37); mpc_set_prec (got, 37); - mpc_set_str (expected, "921FC04EDp-35 ", 16, GMP_RNDN); + mpc_set_str (expected, "921FC04EDp-35 ", 16, MPFR_RNDN); str = mpc_get_str (10, 0, expected, MPC_RNDNN); if (mpc_set_str (got, str, 10, MPC_RNDNN) == -1 || mpc_cmp (got, expected) != 0) diff --git a/tests/tsqr.c b/tests/tsqr.c index 02fea7e..2ec2099 100644 --- a/tests/tsqr.c +++ b/tests/tsqr.c @@ -1,6 +1,6 @@ /* tsqr -- test file for mpc_sqr. -Copyright (C) 2002, 2005, 2008, 2010, 2011 INRIA +Copyright (C) 2002, 2005, 2008, 2010, 2011, 2012 INRIA This file is part of GNU MPC. @@ -148,9 +148,9 @@ reuse_bug (void) /* reuse bug found by Paul Zimmermann 20081021 */ mpc_init2 (z1, 2); /* RE (z1^2) overflows, IM(z^2) = -0 */ - mpfr_set_str (mpc_realref (z1), "0.11", 2, GMP_RNDN); - mpfr_mul_2si (mpc_realref (z1), mpc_realref (z1), mpfr_get_emax (), GMP_RNDN); - mpfr_set_ui (mpc_imagref (z1), 0, GMP_RNDN); + mpfr_set_str (mpc_realref (z1), "0.11", 2, MPFR_RNDN); + mpfr_mul_2si (mpc_realref (z1), mpc_realref (z1), mpfr_get_emax (), MPFR_RNDN); + mpfr_set_ui (mpc_imagref (z1), 0, MPFR_RNDN); mpc_conj (z1, z1, MPC_RNDNN); mpc_sqr (z1, z1, MPC_RNDNN); if (!mpfr_inf_p (mpc_realref (z1)) || mpfr_signbit (mpc_realref (z1)) diff --git a/tests/ttan.c b/tests/ttan.c index f1d826a..c7c672c 100644 --- a/tests/ttan.c +++ b/tests/ttan.c @@ -1,6 +1,6 @@ /* ttan -- test file for mpc_tan. -Copyright (C) 2008, 2011 INRIA +Copyright (C) 2008, 2011, 2012 INRIA This file is part of GNU MPC. @@ -38,8 +38,8 @@ pure_real_argument (void) /* tan(1 +i*0) = tan(1) +i*0 */ mpc_set_ui_ui (z, 1, 0, MPC_RNDNN); - mpfr_set_ui (x, 1, GMP_RNDN); - mpfr_tan (tan_x, x, GMP_RNDN); + mpfr_set_ui (x, 1, MPFR_RNDN); + mpfr_tan (tan_x, x, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0 || !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z))) @@ -59,11 +59,11 @@ pure_real_argument (void) } /* tan(Pi/2 +i*0) = +Inf +i*0 */ - mpfr_const_pi (x, GMP_RNDN); - mpfr_div_2ui (x, x, 1, GMP_RNDN); - mpfr_set (mpc_realref (z), x, GMP_RNDN); - mpfr_set_ui (mpc_imagref (z), 0, GMP_RNDN); - mpfr_tan (tan_x, x, GMP_RNDN); + mpfr_const_pi (x, MPFR_RNDN); + mpfr_div_2ui (x, x, 1, MPFR_RNDN); + mpfr_set (mpc_realref (z), x, MPFR_RNDN); + mpfr_set_ui (mpc_imagref (z), 0, MPFR_RNDN); + mpfr_tan (tan_x, x, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0 || !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z))) @@ -83,9 +83,9 @@ pure_real_argument (void) } /* tan(-Pi/2 +i*0) = -Inf +i*0 */ - mpfr_neg (x, x, GMP_RNDN); + mpfr_neg (x, x, MPFR_RNDN); mpc_neg (z, z, MPC_RNDNN); - mpfr_tan (tan_x, x, GMP_RNDN); + mpfr_tan (tan_x, x, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_realref (tan_z), tan_x) != 0 || !mpfr_zero_p (mpc_imagref (tan_z)) || mpfr_signbit (mpc_imagref (tan_z))) @@ -128,8 +128,8 @@ pure_imaginary_argument (void) /* tan(0 +i) = +0 +i*tanh(1) */ mpc_set_ui_ui (z, 0, 1, MPC_RNDNN); - mpfr_set_ui (y, 1, GMP_RNDN); - mpfr_tanh (tanh_y, y, GMP_RNDN); + mpfr_set_ui (y, 1, MPFR_RNDN); + mpfr_tanh (tanh_y, y, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0 || !mpfr_zero_p (mpc_realref (tan_z)) || mpfr_signbit (mpc_realref (tan_z))) @@ -137,15 +137,15 @@ pure_imaginary_argument (void) mpc_t c99; mpc_init2 (c99, prec); - mpfr_set_ui (mpc_realref (c99), 0, GMP_RNDN); - mpfr_set (mpc_imagref (c99), tanh_y, GMP_RNDN); + mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN); + mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN); TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(0 -i) = +0 +i*tanh(-1) */ mpc_conj (z, z, MPC_RNDNN); - mpfr_neg (tanh_y, tanh_y, GMP_RNDN); + mpfr_neg (tanh_y, tanh_y, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0 || !mpfr_zero_p (mpc_realref (tan_z)) || mpfr_signbit (mpc_realref (tan_z))) @@ -153,15 +153,15 @@ pure_imaginary_argument (void) mpc_t c99; mpc_init2 (c99, prec); - mpfr_set_ui (mpc_realref (c99), 0, GMP_RNDN); - mpfr_set (mpc_imagref (c99), tanh_y, GMP_RNDN); + mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN); + mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN); TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(-0 +i) = -0 +i*tanh(1) */ mpc_neg (z, z, MPC_RNDNN); - mpfr_neg (tanh_y, tanh_y, GMP_RNDN); + mpfr_neg (tanh_y, tanh_y, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0 || !mpfr_zero_p (mpc_realref (tan_z)) || !mpfr_signbit (mpc_realref (tan_z))) @@ -169,15 +169,15 @@ pure_imaginary_argument (void) mpc_t c99; mpc_init2 (c99, prec); - mpfr_set_ui (mpc_realref (c99), 0, GMP_RNDN); - mpfr_set (mpc_imagref (c99), tanh_y, GMP_RNDN); + mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN); + mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN); TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } /* tan(-0 -i) = -0 +i*tanh(-1) */ mpc_conj (z, z, MPC_RNDNN); - mpfr_neg (tanh_y, tanh_y, GMP_RNDN); + mpfr_neg (tanh_y, tanh_y, MPFR_RNDN); mpc_tan (tan_z, z, MPC_RNDNN); if (mpfr_cmp (mpc_imagref (tan_z), tanh_y) != 0 || !mpfr_zero_p (mpc_realref (tan_z)) || !mpfr_signbit (mpc_realref (tan_z))) @@ -185,8 +185,8 @@ pure_imaginary_argument (void) mpc_t c99; mpc_init2 (c99, prec); - mpfr_set_ui (mpc_realref (c99), 0, GMP_RNDN); - mpfr_set (mpc_imagref (c99), tanh_y, GMP_RNDN); + mpfr_set_ui (mpc_realref (c99), 0, MPFR_RNDN); + mpfr_set (mpc_imagref (c99), tanh_y, MPFR_RNDN); TEST_FAILED ("mpc_tan", z, tan_z, c99, MPC_RNDNN); } diff --git a/tests/tui_div.c b/tests/tui_div.c index c109189..40c740a 100644 --- a/tests/tui_div.c +++ b/tests/tui_div.c @@ -1,6 +1,6 @@ /* tui_div -- test file for mpc_ui_div. -Copyright (C) 2008, 2011 INRIA +Copyright (C) 2008, 2011, 2012 INRIA This file is part of GNU MPC. @@ -41,8 +41,8 @@ special (void) } /* 0/(-1-0*I) should give (-0, +0) */ - mpfr_set_str (mpc_realref(a), "-1", 10, GMP_RNDN); - mpfr_set_str (mpc_imagref(a), "-0", 10, GMP_RNDN); + mpfr_set_str (mpc_realref(a), "-1", 10, MPFR_RNDN); + mpfr_set_str (mpc_imagref(a), "-0", 10, MPFR_RNDN); mpc_ui_div (b, 0, a, MPC_RNDNN); if ((mpc_cmp_si_si (b, 0, 0) != 0) || (MPFR_SIGN (mpc_realref(b)) > 0) || (MPFR_SIGN (mpc_imagref(b)) < 0)) -- cgit v1.2.1