From 5f730923ecdeadf8dc8f564bdf02d05c8f24d3d1 Mon Sep 17 00:00:00 2001 From: zimmerma Date: Sat, 18 Jan 2014 00:18:28 +0000 Subject: more progress with mini-gmp: ======================= 9 of 157 tests failed (13 tests were not run) ======================= git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8776 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tset_str.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/tset_str.c') diff --git a/tests/tset_str.c b/tests/tset_str.c index 4f9a6f5a4..e7cbd23eb 100644 --- a/tests/tset_str.c +++ b/tests/tset_str.c @@ -29,9 +29,9 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., mpfr_set_str_binary (x, t); \ if (mpfr_cmp (x, y)) \ { \ - printf ("Error in mpfr_set_str (%d):\n", n); \ + printf ("Error in mpfr_set_str (%d):\nexpected ", n); \ mpfr_print_binary (x); \ - puts (""); \ + printf ("\ngot "); \ mpfr_print_binary (y); \ puts (""); \ mpfr_clear (x); \ @@ -230,7 +230,8 @@ main (int argc, char *argv[]) baseprec = 1 + (prec - 2 + logbase) / logbase; str = mpfr_get_str (NULL, &e, base, baseprec, x, rnd); mpfr_set_str (y, str, base, rnd); - MPFR_EXP(y) += logbase * (e - strlen (str)); + if (!MPFR_IS_ZERO(y)) + MPFR_EXP(y) += logbase * (e - strlen (str)); if (mpfr_cmp (x, y)) { printf ("mpfr_set_str o mpfr_get_str <> id for rnd_mode=%s\n", -- cgit v1.2.1