diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 15:46:06 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-02-27 15:46:06 +0000 |
commit | df7fc35899973db44b5462170f3d533898589d36 (patch) | |
tree | 3ec96a320edcf8957b3327f21acf2e98f15c8516 /tests | |
parent | 206f7135b7061a5536e612846b29f5fefbcb716f (diff) | |
download | mpfr-df7fc35899973db44b5462170f3d533898589d36.tar.gz |
Untabified and deleted trailing spaces (for patches).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6043 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/taway.c | 44 | ||||
-rw-r--r-- | tests/tcoth.c | 4 | ||||
-rw-r--r-- | tests/texceptions.c | 8 | ||||
-rw-r--r-- | tests/texp.c | 2 | ||||
-rw-r--r-- | tests/tget_sj.c | 12 | ||||
-rw-r--r-- | tests/tinternals.c | 2 | ||||
-rw-r--r-- | tests/tpow_all.c | 14 |
7 files changed, 43 insertions, 43 deletions
diff --git a/tests/taway.c b/tests/taway.c index 3fb4b5619..10bf20663 100644 --- a/tests/taway.c +++ b/tests/taway.c @@ -119,14 +119,14 @@ test3 (int (*testfunc)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mp_rnd_t), inexd = testfunc (ref1, ref2, ref3, r); if (mpfr_compare (res1, ref1) || inexa != inexd) - { - printf ("Error with RNDA for %s with ", foo); - DISP("x=",ref2); DISP2(", y=",ref3); - printf ("inexa=%d inexd=%d\n", inexa, inexd); - printf ("expected "); mpfr_print_binary (ref1); puts (""); - printf ("got "); mpfr_print_binary (res1); puts (""); - exit (1); - } + { + printf ("Error with RNDA for %s with ", foo); + DISP("x=",ref2); DISP2(", y=",ref3); + printf ("inexa=%d inexd=%d\n", inexa, inexd); + printf ("expected "); mpfr_print_binary (ref1); puts (""); + printf ("got "); mpfr_print_binary (res1); puts (""); + exit (1); + } } mpfr_clear (ref1); @@ -170,14 +170,14 @@ test4 (int (*testfunc)(mpfr_ptr, mpfr_srcptr, mpfr_srcptr, mpfr_srcptr, set_special (op3, k); inexa = testfunc (res, op1, op2, op3, GMP_RNDA); - r = MPFR_SIGN(res) > 0 ? GMP_RNDU : GMP_RNDD; + r = MPFR_SIGN(res) > 0 ? GMP_RNDU : GMP_RNDD; inexd = testfunc (ref, op1, op2, op3, r); if (mpfr_compare (res, ref) || inexa != inexd) { printf ("Error with RNDA for %s with ", foo); DISP("a=", op1); DISP(", b=", op2); DISP2(", c=", op3); - printf ("inexa=%d inexd=%d\n", inexa, inexd); + printf ("inexa=%d inexd=%d\n", inexa, inexd); DISP("expected ", ref); DISP2(", got ", res); exit (1); } @@ -225,7 +225,7 @@ test2ui (int (*testfunc)(mpfr_ptr, mpfr_srcptr, unsigned long int, mp_rnd_t), { printf ("Error with RNDA for %s for c=%u\n", foo, ref3); DISP2("a=",ref2); - printf ("inexa=%d inexd=%d\n", inexa, inexd); + printf ("inexa=%d inexd=%d\n", inexa, inexd); printf ("expected "); mpfr_print_binary (ref1); puts (""); printf ("got "); mpfr_print_binary (res1); puts (""); exit (1); @@ -265,13 +265,13 @@ testui2 (int (*testfunc)(mpfr_ptr, unsigned long int, mpfr_srcptr, mp_rnd_t), inexd = testfunc (ref1, ref2, ref3, r); if (mpfr_compare (res1, ref1) || inexa != inexd) - { - printf ("Error with RNDA for %s for b=%u\n", foo, ref2); - DISP2("a=", ref3); + { + printf ("Error with RNDA for %s for b=%u\n", foo, ref2); + DISP2("a=", ref3); printf ("inexa=%d inexd=%d\n", inexa, inexd); - DISP("expected ", ref1); DISP2(", got ", res1); - exit (1); - } + DISP("expected ", ref1); DISP2(", got ", res1); + exit (1); + } } mpfr_clear (ref1); @@ -309,7 +309,7 @@ test2 (int (*testfunc)(mpfr_ptr, mpfr_srcptr, mp_rnd_t), char *foo) { printf ("Error with RNDA for %s with ", foo); DISP2("x=", ref2); - printf ("inexa=%d inexd=%d\n", inexa, inexd); + printf ("inexa=%d inexd=%d\n", inexa, inexd); DISP("expected ", ref1); DISP2(", got ", res1); exit (1); } @@ -391,7 +391,7 @@ main (void) while (N--) { /* no need to test mpfr_round, mpfr_ceil, mpfr_floor, mpfr_trunc since - they take no rounding mode */ + they take no rounding mode */ test2ui (mpfr_add_ui, "mpfr_add_ui"); test2ui (mpfr_div_2exp, "mpfr_div_2exp"); @@ -457,7 +457,7 @@ main (void) test2 (mpfr_rint_round, "mpfr_rint_round"); test2 (mpfr_rint_trunc, "mpfr_rint_trunc"); test2 (mpfr_frac, "mpfr_frac"); - + test3 (mpfr_add, "mpfr_add"); test3 (mpfr_sub, "mpfr_sub"); test3 (mpfr_mul, "mpfr_mul"); @@ -468,7 +468,7 @@ main (void) test3 (mpfr_max, "mpfr_max"); /* we don't test reldiff since it does not guarantee correct rounding, - thus we can get different results with RNDA and RNDU or RNDD. */ + thus we can get different results with RNDA and RNDU or RNDD. */ test3 (mpfr_dim, "mpfr_dim"); test3 (mpfr_remainder, "mpfr_remainder"); @@ -477,7 +477,7 @@ main (void) test3 (mpfr_hypot, "mpfr_hypot"); test3a (mpfr_sin_cos, "mpfr_sin_cos"); - + test4 (mpfr_fma, "mpfr_fma"); test4 (mpfr_fms, "mpfr_fms"); diff --git a/tests/tcoth.c b/tests/tcoth.c index c413b5b97..e7ca68336 100644 --- a/tests/tcoth.c +++ b/tests/tcoth.c @@ -159,8 +159,8 @@ underflowed_cothinf (void) err = 1; } mpfr_set_si (y, (i < 0 && (rnd == GMP_RNDD || rnd == GMP_RNDA)) || - (i > 0 && (rnd == GMP_RNDU || rnd == GMP_RNDA)) - ? 2 : 0, GMP_RNDN); + (i > 0 && (rnd == GMP_RNDU || rnd == GMP_RNDA)) + ? 2 : 0, GMP_RNDN); if (i < 0) mpfr_neg (y, y, GMP_RNDN); if (! (mpfr_equal_p (x, y) && diff --git a/tests/texceptions.c b/tests/texceptions.c index b8dba2cfd..51224ae58 100644 --- a/tests/texceptions.c +++ b/tests/texceptions.c @@ -52,10 +52,10 @@ check_default_rnd (void) mpfr_set_default_rounding_mode ((mp_rnd_t) r); t = (mpfr_get_default_rounding_mode) (); if ((mp_rnd_t) r != t) - { - printf ("%s %s\n", mpfr_print_rnd_mode (r), mpfr_print_rnd_mode (t)); - ERROR("ERROR in setting / getting default rounding mode (1)"); - } + { + printf ("%s %s\n", mpfr_print_rnd_mode (r), mpfr_print_rnd_mode (t)); + ERROR("ERROR in setting / getting default rounding mode (1)"); + } } mpfr_set_default_rounding_mode ((mp_rnd_t) GMP_RND_MAX); if (mpfr_get_default_rounding_mode() != GMP_RNDA) diff --git a/tests/texp.c b/tests/texp.c index ca6ddd539..1f63c538b 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -817,7 +817,7 @@ underflow_up (int extended_emin) flags = MPFR_FLAGS_INEXACT | (((rnd == GMP_RNDU || rnd == GMP_RNDA) - && (i == 1 || j == 0)) || + && (i == 1 || j == 0)) || (rnd == GMP_RNDN && (i == 1 && j == 0)) ? 0 : MPFR_FLAGS_UNDERFLOW); mpfr_clear_flags (); diff --git a/tests/tget_sj.c b/tests/tget_sj.c index 40de1b601..1a7d4a92d 100644 --- a/tests/tget_sj.c +++ b/tests/tget_sj.c @@ -79,9 +79,9 @@ check_sj (intmax_t s, mpfr_ptr x) continue; if (rnd == GMP_RNDU && i > 0) continue; - if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || - (MPFR_IS_NEG(y) && i < 0))) - continue; + if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || + (MPFR_IS_NEG(y) && i < 0))) + continue; /* rint (y) == x == s */ r = mpfr_get_sj (y, (mp_rnd_t) rnd); if (r != s) @@ -122,9 +122,9 @@ check_uj (uintmax_t u, mpfr_ptr x) continue; if (rnd == GMP_RNDU && i > 0) continue; - if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || - (MPFR_IS_NEG(y) && i < 0))) - continue; + if (rnd == GMP_RNDA && ((MPFR_IS_POS(y) && i > 0) || + (MPFR_IS_NEG(y) && i < 0))) + continue; /* rint (y) == x == u */ r = mpfr_get_uj (y, (mp_rnd_t) rnd); if (r != u) diff --git a/tests/tinternals.c b/tests/tinternals.c index a1908086b..f055ad45d 100644 --- a/tests/tinternals.c +++ b/tests/tinternals.c @@ -80,7 +80,7 @@ test_round_near_x (void) So, no failure in this case. */ continue; } - + inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub) (z, x, eps, (mp_rnd_t) r); if (inex * inex2 <= 0) diff --git a/tests/tpow_all.c b/tests/tpow_all.c index 969e62929..cfb70d727 100644 --- a/tests/tpow_all.c +++ b/tests/tpow_all.c @@ -630,7 +630,7 @@ underflow_up3 (void) /* x = 2 + i * eps, y = emin - 2, x^y ~= 2^(emin - 2) */ expected_inex = rnd == GMP_RNDU || rnd == GMP_RNDA - || (rnd == GMP_RNDN && i < 0) ? 1 : -1; + || (rnd == GMP_RNDN && i < 0) ? 1 : -1; mpfr_set_ui (z0, 0, GMP_RNDN); if (expected_inex > 0) @@ -696,12 +696,12 @@ overflow_inv (void) RND_LOOP (rnd) { int inf, overflow; - mp_rnd_t rnd2; - - if (rnd == GMP_RNDA) - rnd2 = s < 0 ? GMP_RNDD : GMP_RNDU; - else - rnd2 = rnd; + mp_rnd_t rnd2; + + if (rnd == GMP_RNDA) + rnd2 = s < 0 ? GMP_RNDD : GMP_RNDU; + else + rnd2 = rnd; overflow = t == 0 || ((mp_rnd_t) rnd == GMP_RNDN && (precx > 10 || t == 1)) || |