summaryrefslogtreecommitdiff
path: root/tests/tsub1sp.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-02-19 01:10:13 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-02-19 01:10:13 +0000
commit03f1eebc1937d4031e1fba2e9c4a60de0061ff6d (patch)
tree5e54819c1f852a07961d0cb16243a6bd9b0da6a7 /tests/tsub1sp.c
parent450cd4a3a9b9b42301befa06a92367f651e7cfd4 (diff)
downloadmpfr-03f1eebc1937d4031e1fba2e9c4a60de0061ff6d.tar.gz
[tests] Fixed type errors with -D_MPFR_PREC_FORMAT=2 in CFLAGS and the
--enable-assert=full configure option (signaled by GCC's -Wformat). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12302 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsub1sp.c')
-rw-r--r--tests/tsub1sp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c
index adc4e3aef..ff3c1506b 100644
--- a/tests/tsub1sp.c
+++ b/tests/tsub1sp.c
@@ -269,7 +269,8 @@ bug20171213_gen (mpfr_prec_t pmax)
mpfr_div_2exp (d, d, e, MPFR_RNDN); /* b = 1 - 2^(-e) */
if (! mpfr_equal_p (a, d))
{
- printf ("bug20171213_gen failed for p=%lu, e=%lu\n", p, e);
+ printf ("bug20171213_gen failed for p=%ld, e=%ld\n",
+ (long) p, (long) e);
printf ("b="); mpfr_dump (b);
printf ("c="); mpfr_dump (c);
printf ("got a="); mpfr_dump (a);
@@ -887,8 +888,8 @@ check_underflow (mpfr_prec_t p)
inexact = mpfr_sub (x, y, z, MPFR_RNDN);
if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0))
{
- printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%lu\n",
- p);
+ printf ("4*2^(emin-2) - 3*2^(emin-2) with RNDN failed for p=%ld\n",
+ (long) p);
printf ("Expected inexact < 0 with x=0\n");
printf ("Got inexact=%d with x=", inexact);
mpfr_dump (x);
@@ -903,8 +904,8 @@ check_underflow (mpfr_prec_t p)
inexact = mpfr_sub (x, y, z, MPFR_RNDN);
if (inexact >= 0 || (mpfr_cmp_ui (x, 0) != 0))
{
- printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%lu\n",
- p);
+ printf ("5*2^(emin-2) - 4*2^(emin-2) with RNDN failed for p=%ld\n",
+ (long) p);
printf ("Expected inexact < 0 with x=0\n");
printf ("Got inexact=%d with x=", inexact);
mpfr_dump (x);