diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 02:03:41 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 02:03:41 +0000 |
commit | 4702241ac4306c325b1ee1fa91b38b6ef1bc290c (patch) | |
tree | 9f5229cd211b04a6e5fd00e4d1913622ec8b1f8c /tests/tgeneric_ui.c | |
parent | 4c18607bcb502d98d2ad91f5be6921e45754c4da (diff) | |
download | mpfr-4702241ac4306c325b1ee1fa91b38b6ef1bc290c.tar.gz |
[tests/tgeneric_ui.c] Added missing \n. Minor improvements.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9495 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgeneric_ui.c')
-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); } } |