diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-04-07 13:59:37 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-04-07 13:59:37 +0000 |
commit | 01468b489e2ad35217f4a4eab6b9f160c5d8049c (patch) | |
tree | b90258a76462738d19df6f54665ec79192e5ad76 /tests/ttrunc.c | |
parent | aab6696198475b5b6575a01aab71eec62c00cf4c (diff) | |
download | mpfr-01468b489e2ad35217f4a4eab6b9f160c5d8049c.tar.gz |
Replaced various instances of mpfr_print_binary + newline (sometimes
missing) by mpfr_dump.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10252 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/ttrunc.c')
-rw-r--r-- | tests/ttrunc.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/ttrunc.c b/tests/ttrunc.c index 7d222c4d1..be0edd816 100644 --- a/tests/ttrunc.c +++ b/tests/ttrunc.c @@ -39,8 +39,7 @@ main (void) if (mpfr_cmp_ui (y, 1)) { printf ("Error in mpfr_ceil for x=0.5: expected 1.0, got "); - mpfr_print_binary(y); - putchar('\n'); + mpfr_dump (y); exit (1); } @@ -49,8 +48,7 @@ main (void) if (mpfr_cmp_ui(y,0)) { printf ("Error in mpfr_ceil for x=0.0: expected 0.0, got "); - mpfr_print_binary(y); - putchar('\n'); + mpfr_dump (y); exit (1); } @@ -59,8 +57,7 @@ main (void) if (mpfr_cmp_ui(y,1)) { printf ("Error in mpfr_ceil for x=1.0: expected 1.0, got "); - mpfr_print_binary(y); - putchar('\n'); + mpfr_dump (y); exit (1); } @@ -89,34 +86,25 @@ main (void) if (!mpfr_eq(y, y2, k)) { - printf("Error in floor, x = "); mpfr_print_binary(x); - printf("\n"); - printf("floor(x) = "); mpfr_print_binary(y); - printf("\n"); - printf("round(x, RNDD) = "); mpfr_print_binary(y2); - printf("\n"); + printf ("Error in floor, x = "); mpfr_dump (x); + printf ("floor(x) = "); mpfr_dump (y); + printf ("round(x, RNDD) = "); mpfr_dump (y2); exit(1); } if (!mpfr_eq(z, z2, k)) { - printf("Error in trunc, x = "); mpfr_print_binary(x); - printf("\n"); - printf("trunc(x) = "); mpfr_print_binary(z); - printf("\n"); - printf("round(x, RNDZ) = "); mpfr_print_binary(z2); - printf("\n"); + printf ("Error in trunc, x = "); mpfr_dump (x); + printf ("trunc(x) = "); mpfr_dump (z); + printf ("round(x, RNDZ) = "); mpfr_dump (z2); exit(1); } if (!mpfr_eq(y, y2, k)) { - printf("Error in ceil, x = "); mpfr_print_binary(x); - printf("\n"); - printf("ceil(x) = "); mpfr_print_binary(t); - printf("\n"); - printf("round(x, RNDU) = "); mpfr_print_binary(t2); - printf("\n"); + printf ("Error in ceil, x = "); mpfr_dump (x); + printf ("ceil(x) = "); mpfr_dump (t); + printf ("round(x, RNDU) = "); mpfr_dump (t2); exit(1); } MPFR_EXP(x)++; |