summaryrefslogtreecommitdiff
path: root/tests/tsub_d.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/tsub_d.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/tsub_d.c')
-rw-r--r--tests/tsub_d.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/tsub_d.c b/tests/tsub_d.c
index 9350b1c20..1366d2ca2 100644
--- a/tests/tsub_d.c
+++ b/tests/tsub_d.c
@@ -40,7 +40,7 @@ check_nans (void)
/* nan - 1.0 is nan */
mpfr_set_nan (x);
mpfr_clear_flags ();
- inexact = mpfr_sub_d (y, x, 1.0, GMP_RNDN);
+ inexact = mpfr_sub_d (y, x, 1.0, MPFR_RNDN);
MPFR_ASSERTN (inexact == 0);
MPFR_ASSERTN ((__gmpfr_flags ^ MPFR_FLAGS_NAN) == 0);
MPFR_ASSERTN (mpfr_nan_p (y));
@@ -48,7 +48,7 @@ check_nans (void)
/* +inf - 1.0 == +inf */
mpfr_set_inf (x, 1);
mpfr_clear_flags ();
- inexact = mpfr_sub_d (y, x, 1.0, GMP_RNDN);
+ inexact = mpfr_sub_d (y, x, 1.0, MPFR_RNDN);
MPFR_ASSERTN (inexact == 0);
MPFR_ASSERTN (__gmpfr_flags == 0);
MPFR_ASSERTN (mpfr_inf_p (y));
@@ -57,7 +57,7 @@ check_nans (void)
/* -inf - 1.0 == -inf */
mpfr_set_inf (x, -1);
mpfr_clear_flags ();
- inexact = mpfr_sub_d (y, x, 1.0, GMP_RNDN);
+ inexact = mpfr_sub_d (y, x, 1.0, MPFR_RNDN);
MPFR_ASSERTN (inexact == 0);
MPFR_ASSERTN (__gmpfr_flags == 0);
MPFR_ASSERTN (mpfr_inf_p (y));
@@ -85,24 +85,24 @@ main (void)
mpfr_init2 (y, IEEE_DBL_MANT_DIG);
mpfr_init2 (z, IEEE_DBL_MANT_DIG);
- mpfr_set_str (y, "4096", 10, GMP_RNDN);
+ mpfr_set_str (y, "4096", 10, MPFR_RNDN);
d = 0.125;
mpfr_clear_flags ();
- inexact = mpfr_sub_d (x, y, d, GMP_RNDN);
+ inexact = mpfr_sub_d (x, y, d, MPFR_RNDN);
if (inexact != 0)
{
printf ("Inexact flag error in mpfr_sub_d\n");
exit (1);
}
- mpfr_set_str (z, "4095.875", 10, GMP_RNDN);
+ mpfr_set_str (z, "4095.875", 10, MPFR_RNDN);
if (mpfr_cmp (z, x))
{
printf ("Error in mpfr_sub_d (");
- mpfr_out_str (stdout, 10, 7, y, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 7, y, MPFR_RNDN);
printf (" + %.20g)\nexpected ", d);
- mpfr_out_str (stdout, 10, 0, z, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, z, MPFR_RNDN);
printf ("\ngot ");
- mpfr_out_str (stdout, 10, 0, x, GMP_RNDN);
+ mpfr_out_str (stdout, 10, 0, x, MPFR_RNDN);
printf ("\n");
exit (1);
}