summaryrefslogtreecommitdiff
path: root/tests/tset_str.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-18 00:18:28 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2014-01-18 00:18:28 +0000
commit5f730923ecdeadf8dc8f564bdf02d05c8f24d3d1 (patch)
treef36a8a00699a9fafe8eb5719df6d995704827813 /tests/tset_str.c
parentfa1c07416cd26300ae4cdcff1d1710c0596af8a4 (diff)
downloadmpfr-5f730923ecdeadf8dc8f564bdf02d05c8f24d3d1.tar.gz
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
Diffstat (limited to 'tests/tset_str.c')
-rw-r--r--tests/tset_str.c7
1 files changed, 4 insertions, 3 deletions
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",