summaryrefslogtreecommitdiff
path: root/tests/tcmp2.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-03 16:51:07 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2009-03-03 16:51:07 +0000
commitf5f7883fc7cf47d38ed493a882fd7109bdd589bb (patch)
tree1058cf0d07593fa2cec9f32b4988ac40611b4bff /tests/tcmp2.c
parentcbd40e1cb659b579e608afbe7a05da5b15a860be (diff)
downloadmpfr-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/tcmp2.c')
-rw-r--r--tests/tcmp2.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/tcmp2.c b/tests/tcmp2.c
index d3cd28083..67ed39565 100644
--- a/tests/tcmp2.c
+++ b/tests/tcmp2.c
@@ -56,31 +56,31 @@ worst_cases (void)
mpfr_init2 (x, 200);
mpfr_init2 (y, 200);
- mpfr_set_ui (y, 1, GMP_RNDN);
+ mpfr_set_ui (y, 1, MPFR_RNDN);
for (i = 1; i < MPFR_PREC(x); i++)
{
- mpfr_set_ui (x, 1, GMP_RNDN);
- mpfr_div_2exp (y, y, 1, GMP_RNDN); /* y = 1/2^i */
+ mpfr_set_ui (x, 1, MPFR_RNDN);
+ mpfr_div_2exp (y, y, 1, MPFR_RNDN); /* y = 1/2^i */
l = 0;
if (mpfr_cmp2 (x, y, &l) <= 0 || l != 1)
{
printf ("Error in mpfr_cmp2:\nx=");
- mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, y, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
printf ("\ngot %lu instead of 1\n", l);
exit (1);
}
- mpfr_add (x, x, y, GMP_RNDN); /* x = 1 + 1/2^i */
+ mpfr_add (x, x, y, MPFR_RNDN); /* x = 1 + 1/2^i */
l = 0;
if (mpfr_cmp2 (x, y, &l) <= 0 || l != 0)
{
printf ("Error in mpfr_cmp2:\nx=");
- mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, y, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
printf ("\ngot %lu instead of 0\n", l);
exit (1);
}
@@ -89,7 +89,7 @@ worst_cases (void)
for (i = 0; i < 64; i++) /* |u| = i */
{
mpfr_urandomb (x, RANDS);
- mpfr_set (y, x, GMP_RNDN);
+ mpfr_set (y, x, MPFR_RNDN);
set_bit (x, i + 1, 1);
set_bit (y, i + 1, 0);
for (j = 0; j < 64; j++) /* |v| = j */
@@ -110,9 +110,9 @@ worst_cases (void)
if (l != expected)
{
printf ("Error in mpfr_cmp2:\nx=");
- mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, y, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
printf ("\ngot %lu instead of %u\n", l, expected);
exit (1);
}
@@ -124,9 +124,9 @@ worst_cases (void)
if (l != expected)
{
printf ("Error in mpfr_cmp2:\nx=");
- mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, x, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, y, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, y, MPFR_RNDN);
printf ("\ngot %lu instead of %u\n", l, expected);
exit (1);
}
@@ -152,17 +152,17 @@ tcmp2 (double x, double y, int i)
i = (int) (__gmpfr_floor_log2 (x) - __gmpfr_floor_log2 (x - y));
}
mpfr_init2(xx, 53); mpfr_init2(yy, 53);
- mpfr_set_d (xx, x, GMP_RNDN);
- mpfr_set_d (yy, y, GMP_RNDN);
+ mpfr_set_d (xx, x, MPFR_RNDN);
+ mpfr_set_d (yy, y, MPFR_RNDN);
j = 0;
if (mpfr_cmp2 (xx, yy, &j) == 0)
{
if (x != y)
{
printf ("Error in mpfr_cmp2 for\nx=");
- mpfr_out_str (stdout, 2, 0, xx, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, xx, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, yy, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, yy, MPFR_RNDN);
printf ("\ngot sign 0 for x != y\n");
exit (1);
}
@@ -170,9 +170,9 @@ tcmp2 (double x, double y, int i)
else if (j != (unsigned) i)
{
printf ("Error in mpfr_cmp2 for\nx=");
- mpfr_out_str (stdout, 2, 0, xx, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, xx, MPFR_RNDN);
printf ("\ny=");
- mpfr_out_str (stdout, 2, 0, yy, GMP_RNDN);
+ mpfr_out_str (stdout, 2, 0, yy, MPFR_RNDN);
printf ("\ngot %lu instead of %d\n", j, i);
exit (1);
}
@@ -248,7 +248,7 @@ special (void)
/* bug found by Nathalie Revol, 2 Apr 2001 */
mpfr_set_prec (x, 65); mpfr_set_prec (y, 65);
- mpfr_set_ui (x, 5, GMP_RNDN);
+ mpfr_set_ui (x, 5, MPFR_RNDN);
mpfr_set_str_binary (y, "0.10011111111111111111111111111111111111111111111111111111111111101E3");
j = 0;
if (mpfr_cmp2(x, y, &j) <= 0 || j != 63)