diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-03 16:51:07 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-03 16:51:07 +0000 |
commit | f5f7883fc7cf47d38ed493a882fd7109bdd589bb (patch) | |
tree | 1058cf0d07593fa2cec9f32b4988ac40611b4bff /tests/tset_sj.c | |
parent | cbd40e1cb659b579e608afbe7a05da5b15a860be (diff) | |
download | mpfr-f5f7883fc7cf47d38ed493a882fd7109bdd589bb.tar.gz |
GMP_RNDX -> MPFR_RNDX
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6053 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_sj.c')
-rw-r--r-- | tests/tset_sj.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/tset_sj.c b/tests/tset_sj.c index 98141309e..7c01a64c7 100644 --- a/tests/tset_sj.c +++ b/tests/tset_sj.c @@ -80,8 +80,8 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N) { /* mp_limb_t may be unsigned long long */ limb = (unsigned long) randlimb (); - inex1 = mpfr_set_uj (x, limb, GMP_RNDN); - inex2 = mpfr_set_ui (y, limb, GMP_RNDN); + inex1 = mpfr_set_uj (x, limb, MPFR_RNDN); + inex2 = mpfr_set_ui (y, limb, MPFR_RNDN); if (mpfr_cmp (x, y)) { printf ("ERROR for mpfr_set_uj and j=%lu and p=%lu\n", @@ -101,14 +101,14 @@ check_set_uj (mp_prec_t pmin, mp_prec_t pmax, int N) } /* Special case */ mpfr_set_prec (x, sizeof(uintmax_t)*CHAR_BIT); - inex1 = mpfr_set_uj (x, UINTMAX_MAX, GMP_RNDN); + inex1 = mpfr_set_uj (x, UINTMAX_MAX, MPFR_RNDN); if (inex1 != 0 || mpfr_sgn(x) <= 0) ERROR ("inexact / UINTMAX_MAX"); - inex1 = mpfr_add_ui (x, x, 1, GMP_RNDN); + inex1 = mpfr_add_ui (x, x, 1, MPFR_RNDN); if (inex1 != 0 || !mpfr_powerof2_raw (x) || MPFR_EXP (x) != (sizeof(uintmax_t)*CHAR_BIT+1) ) ERROR ("power of 2"); - mpfr_set_uj (x, 0, GMP_RNDN); + mpfr_set_uj (x, 0, MPFR_RNDN); if (!MPFR_IS_ZERO (x)) ERROR ("Setting 0"); @@ -123,30 +123,30 @@ check_set_uj_2exp (void) mpfr_init2 (x, sizeof(uintmax_t)*CHAR_BIT); - inex = mpfr_set_uj_2exp (x, 1, 0, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, 1, 0, MPFR_RNDN); if (inex || mpfr_cmp_ui(x, 1)) ERROR("(1U,0)"); - inex = mpfr_set_uj_2exp (x, 1024, -10, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, 1024, -10, MPFR_RNDN); if (inex || mpfr_cmp_ui(x, 1)) ERROR("(1024U,-10)"); - inex = mpfr_set_uj_2exp (x, 1024, 10, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, 1024, 10, MPFR_RNDN); if (inex || mpfr_cmp_ui(x, 1024L * 1024L)) ERROR("(1024U,+10)"); - inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, 1000, GMP_RNDN); - inex |= mpfr_div_2ui (x, x, 1000, GMP_RNDN); - inex |= mpfr_add_ui (x, x, 1, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, 1000, MPFR_RNDN); + inex |= mpfr_div_2ui (x, x, 1000, MPFR_RNDN); + inex |= mpfr_add_ui (x, x, 1, MPFR_RNDN); if (inex || !mpfr_powerof2_raw (x) || MPFR_EXP (x) != (sizeof(uintmax_t)*CHAR_BIT+1) ) ERROR("(UINTMAX_MAX)"); - inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, MPFR_EMAX_MAX-10, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, MPFR_EMAX_MAX-10, MPFR_RNDN); if (inex == 0 || !mpfr_inf_p (x)) ERROR ("Overflow"); - inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, MPFR_EMIN_MIN-1000, GMP_RNDN); + inex = mpfr_set_uj_2exp (x, UINTMAX_MAX, MPFR_EMIN_MIN-1000, MPFR_RNDN); if (inex == 0 || !MPFR_IS_ZERO (x)) ERROR ("Underflow"); @@ -161,13 +161,13 @@ check_set_sj (void) mpfr_init2 (x, sizeof(intmax_t)*CHAR_BIT-1); - inex = mpfr_set_sj (x, -INTMAX_MAX, GMP_RNDN); - inex |= mpfr_add_si (x, x, -1, GMP_RNDN); + inex = mpfr_set_sj (x, -INTMAX_MAX, MPFR_RNDN); + inex |= mpfr_add_si (x, x, -1, MPFR_RNDN); if (inex || mpfr_sgn (x) >=0 || !mpfr_powerof2_raw (x) || MPFR_EXP (x) != (sizeof(intmax_t)*CHAR_BIT) ) ERROR("set_sj (-INTMAX_MAX)"); - inex = mpfr_set_sj (x, 1742, GMP_RNDN); + inex = mpfr_set_sj (x, 1742, MPFR_RNDN); if (inex || mpfr_cmp_ui (x, 1742)) ERROR ("set_sj (1742)"); @@ -182,7 +182,7 @@ check_set_sj_2exp (void) mpfr_init2 (x, sizeof(intmax_t)*CHAR_BIT-1); - inex = mpfr_set_sj_2exp (x, INTMAX_MIN, 1000, GMP_RNDN); + inex = mpfr_set_sj_2exp (x, INTMAX_MIN, 1000, MPFR_RNDN); if (inex || mpfr_sgn (x) >=0 || !mpfr_powerof2_raw (x) || MPFR_EXP (x) != (sizeof(intmax_t)*CHAR_BIT+1000) ) ERROR("set_sj_2exp (INTMAX_MIN)"); |