summaryrefslogtreecommitdiff
path: root/tests/tlog10.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/tlog10.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/tlog10.c')
-rw-r--r--tests/tlog10.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/tlog10.c b/tests/tlog10.c
index dc938ce66..4017b8a08 100644
--- a/tests/tlog10.c
+++ b/tests/tlog10.c
@@ -30,7 +30,7 @@ static int
test_log10 (mpfr_ptr a, mpfr_srcptr b, mp_rnd_t rnd_mode)
{
int res;
- int ok = rnd_mode == GMP_RNDN && mpfr_number_p (b) && mpfr_get_prec (a)>=53;
+ int ok = rnd_mode == MPFR_RNDN && mpfr_number_p (b) && mpfr_get_prec (a)>=53;
if (ok)
{
mpfr_print_raw (b);
@@ -68,42 +68,42 @@ main (int argc, char *argv[])
/* check NaN */
mpfr_set_nan (x);
- inex = test_log10 (y, x, GMP_RNDN);
+ inex = test_log10 (y, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_nan_p (y) && inex == 0);
/* check Inf */
mpfr_set_inf (x, -1);
- inex = test_log10 (y, x, GMP_RNDN);
+ inex = test_log10 (y, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_nan_p (y) && inex == 0);
mpfr_set_inf (x, 1);
- inex = test_log10 (y, x, GMP_RNDN);
+ inex = test_log10 (y, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_inf_p (y) && mpfr_sgn (y) > 0 && inex == 0);
- mpfr_set_ui (x, 0, GMP_RNDN);
- inex = test_log10 (x, x, GMP_RNDN);
+ mpfr_set_ui (x, 0, MPFR_RNDN);
+ inex = test_log10 (x, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_inf_p (x) && mpfr_sgn (x) < 0 && inex == 0);
- mpfr_set_ui (x, 0, GMP_RNDN);
- mpfr_neg (x, x, GMP_RNDN);
- inex = test_log10 (x, x, GMP_RNDN);
+ mpfr_set_ui (x, 0, MPFR_RNDN);
+ mpfr_neg (x, x, MPFR_RNDN);
+ inex = test_log10 (x, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_inf_p (x) && mpfr_sgn (x) < 0 && inex == 0);
/* check negative argument */
- mpfr_set_si (x, -1, GMP_RNDN);
- inex = test_log10 (y, x, GMP_RNDN);
+ mpfr_set_si (x, -1, MPFR_RNDN);
+ inex = test_log10 (y, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_nan_p (y) && inex == 0);
/* check log10(1) = 0 */
- mpfr_set_ui (x, 1, GMP_RNDN);
- inex = test_log10 (y, x, GMP_RNDN);
+ mpfr_set_ui (x, 1, MPFR_RNDN);
+ inex = test_log10 (y, x, MPFR_RNDN);
MPFR_ASSERTN (mpfr_cmp_ui (y, 0) == 0 && MPFR_IS_POS (y) && inex == 0);
/* check log10(10^n)=n */
- mpfr_set_ui (x, 1, GMP_RNDN);
+ mpfr_set_ui (x, 1, MPFR_RNDN);
for (n = 1; n <= 15; n++)
{
- mpfr_mul_ui (x, x, 10, GMP_RNDN); /* x = 10^n */
- inex = test_log10 (y, x, GMP_RNDN);
+ mpfr_mul_ui (x, x, 10, MPFR_RNDN); /* x = 10^n */
+ inex = test_log10 (y, x, MPFR_RNDN);
if (mpfr_cmp_ui (y, n))
{
printf ("log10(10^n) <> n for n=%u\n", n);