diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-14 15:28:21 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-14 15:28:21 +0000 |
commit | 637828131d10c07859b8715e6acd7ec5aa939e56 (patch) | |
tree | 467151881401bdbde18b2254040f489a8d7b86ad /tests/tdiv.c | |
parent | 57572d9ed5f15ea3355e721b6b60535ad19ddb8a (diff) | |
download | mpfr-637828131d10c07859b8715e6acd7ec5aa939e56.tar.gz |
[tests] Got rid of the use of mpfr_print_binary, in general with
mpfr_dump. Replaced some "mpfr_out_str (stdout, 2, ...)" by mpfr_dump
for consistency or as improvements. Some other corrections in the
related error messages.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11750 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tdiv.c')
-rw-r--r-- | tests/tdiv.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/tdiv.c b/tests/tdiv.c index 9b4988aac..fba3b9a82 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -163,10 +163,11 @@ check4 (const char *Ns, const char *Ds, mpfr_rnd_t rnd_mode, int p, { printf ("mpfr_div failed for n=%s, d=%s, p=%d, rnd_mode=%s\n", Ns, Ds, p, mpfr_print_rnd_mode (rnd_mode)); - printf ("got ");mpfr_print_binary(q); + printf ("got "); + mpfr_dump (q); mpfr_set_str (q, Qs, ((p==53) ? 10 : 2), MPFR_RNDN); - printf("\nexpected "); mpfr_print_binary(q); - putchar('\n'); + printf ("expected "); + mpfr_dump (q); exit (1); } mpfr_clears (q, n, d, (mpfr_ptr) 0); @@ -292,14 +293,14 @@ check_64(void) test_div(z, x, y, MPFR_RNDU); if (mpfr_cmp_str (z, "0.1001001001101101010010100101011110000010111001001010100000000000E-529", 2, MPFR_RNDN)) { - printf("Error for tdiv for MPFR_RNDU and p=64\nx="); - mpfr_print_binary(x); - printf("\ny="); - mpfr_print_binary(y); - printf("\ngot "); - mpfr_print_binary(z); - printf("\nexpected 0.1001001001101101010010100101011110000010111001001010100000000000E-529\n"); - exit(1); + printf ("Error for tdiv for MPFR_RNDU and p=64\nx="); + mpfr_dump (x); + printf ("y="); + mpfr_dump (y); + printf ("got "); + mpfr_dump (z); + printf ("expected 0.1001001001101101010010100101011110000010111001001010100000000000E-529\n"); + exit (1); } mpfr_clears (x, y, z, (mpfr_ptr) 0); |