diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-07-15 14:22:19 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-07-15 14:22:19 +0000 |
commit | 2deb427ba3d39c84fba3281c627a6cbcf4a7b706 (patch) | |
tree | e263ce302af4a2ccefefe2ab9c3b57768fb6b69b | |
parent | 9611c872cafe83a71c8931c990187ea0443c7952 (diff) | |
download | mpfr-2deb427ba3d39c84fba3281c627a6cbcf4a7b706.tar.gz |
[tests/tfrexp.c] Simplification: merged the tests on the ternary values,
the returned MPFR values and the flags.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9617 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/tfrexp.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/tfrexp.c b/tests/tfrexp.c index 1c3ef6bb4..7fa15273e 100644 --- a/tests/tfrexp.c +++ b/tests/tfrexp.c @@ -191,14 +191,6 @@ static void check1 (void) mpfr_dump (y2); exit (1); } - if (! SAME_SIGN (inex1, inex2)) - { - printf ("Error in check1 for %s, red = %d, x = ", - mpfr_print_rnd_mode ((mpfr_rnd_t) r), red); - mpfr_dump (x); - printf ("Expected inex ~= %d, got %d\n", inex1, inex2); - exit (1); - } if (!red) { if (e2 > 0) @@ -206,7 +198,9 @@ static void check1 (void) else if (e2 < 0) mpfr_div_2ui (y2, y2, -e2, MPFR_RNDN); } - if (! mpfr_equal_p (y1, y2)) + if (! (SAME_SIGN (inex1, inex2) && + mpfr_equal_p (y1, y2) && + flags1 == flags2)) { printf ("Error in check1 for %s, red = %d, x = ", mpfr_print_rnd_mode ((mpfr_rnd_t) r), red); @@ -215,13 +209,7 @@ static void check1 (void) mpfr_dump (y1); printf ("Got y2 = "); mpfr_dump (y2); - exit (1); - } - if (flags1 != flags2) - { - printf ("Error in check1 for %s, red = %d, x = ", - mpfr_print_rnd_mode ((mpfr_rnd_t) r), red); - mpfr_dump (x); + printf ("Expected inex ~= %d, got %d\n", inex1, inex2); printf ("Expected flags:"); flags_out (flags1); printf ("Got flags: "); |