diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 02:07:49 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 02:07:49 +0000 |
commit | 75c893144ef45915ba709b641bf69f81ad8e179d (patch) | |
tree | f91fc8ec50ab0371e76c7261f10773b9bb609097 /tests | |
parent | afe4220f8d65c7a1c54b0a89bf481f8bc4646c45 (diff) | |
download | mpfr-75c893144ef45915ba709b641bf69f81ad8e179d.tar.gz |
[tests/tgeneric_ui.c] Added missing \n. Minor improvements.
(merged changeset r9495 from the trunk)
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/3.1@9496 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tgeneric_ui.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/tgeneric_ui.c b/tests/tgeneric_ui.c index 6fee82922..0cbc05e4c 100644 --- a/tests/tgeneric_ui.c +++ b/tests/tgeneric_ui.c @@ -100,16 +100,14 @@ test_generic_ui (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) compare = compare + compare2; else compare = inexact; /* cannot determine sign(t-f(x)) */ - if (((inexact == 0) && (compare != 0)) || - ((inexact > 0) && (compare <= 0)) || - ((inexact < 0) && (compare >= 0))) + if (! SAME_SIGN (inexact, compare)) { printf ("Wrong inexact flag for rnd=%s: expected %d, got %d" "\n", mpfr_print_rnd_mode (rnd), compare, inexact); - printf ("x="); mpfr_print_binary (x); puts (""); - printf ("u=%lu", (unsigned long) u); - printf ("y="); mpfr_print_binary (y); puts (""); - printf ("t="); mpfr_print_binary (t); puts (""); + printf ("x = "); mpfr_dump (x); + printf ("u = %lu\n", (unsigned long) u); + printf ("y = "); mpfr_dump (y); + printf ("t = "); mpfr_dump (t); exit (1); } } |