From 2c85730f36ac232ff81bda66687af824546a81c7 Mon Sep 17 00:00:00 2001 From: pelissip Date: Mon, 15 Dec 2003 14:39:35 +0000 Subject: + Optimize a few div.c + Remove some warnings in asin.c, atan.c. + Include limits.h before gmp-impl.h in mpfr-impl.h + mpfr-tests.h doesn't include anumore standard include files. + Test files include only standard includes and mpfr-tests.h. + Add some forgotten mpfr_clear in mpf[r]_compat. + Remove some warnings in the tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2576 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/memory.c | 10 +++++++--- tests/mpf_compat.h | 7 +++++++ tests/reuse.c | 4 +--- tests/rnd_mode.c | 10 ---------- tests/tabs.c | 5 +---- tests/tacos.c | 5 +---- tests/tacosh.c | 5 +---- tests/tadd.c | 14 ++++++++++---- tests/tadd_ui.c | 5 +---- tests/tagm.c | 5 +---- tests/tasin.c | 5 +---- tests/tasinh.c | 5 +---- tests/tatan.c | 5 +---- tests/tatanh.c | 5 +---- tests/tcan_round.c | 5 +---- tests/tcbrt.c | 3 +-- tests/tcheck.c | 2 +- tests/tcmp.c | 5 +---- tests/tcmp2.c | 9 +++------ tests/tcmp_d.c | 3 +-- tests/tcmp_ui.c | 3 +-- tests/tcomparisons.c | 5 +---- tests/tconst_euler.c | 4 +--- tests/tconst_log2.c | 5 +---- tests/tconst_pi.c | 3 +-- tests/tcos.c | 4 +--- tests/tcosh.c | 5 +---- tests/tdiv.c | 5 +---- tests/tdiv_ui.c | 5 +---- tests/tdump.c | 3 +-- tests/teq.c | 6 ++---- tests/terf.c | 5 +---- tests/tests.c | 14 +++----------- tests/texceptions.c | 5 +---- tests/texp.c | 5 +---- tests/texp2.c | 5 +---- tests/texpm1.c | 5 +---- tests/tfactorial.c | 8 +++----- tests/tfma.c | 11 +++-------- tests/tfrac.c | 3 +-- tests/tgamma.c | 5 +---- tests/tgeneric.c | 2 +- tests/tget_d.c | 5 +---- tests/tget_d_2exp.c | 7 ++----- tests/tget_str.c | 7 ++----- tests/thyperbolic.c | 6 ++---- tests/thypot.c | 5 +---- tests/tinits.c | 4 ---- tests/tisnan.c | 3 +-- tests/tlog.c | 5 +---- tests/tlog10.c | 5 +---- tests/tlog1p.c | 5 +---- tests/tlog2.c | 5 +---- tests/tmul.c | 5 +---- tests/tmul_2exp.c | 5 +---- tests/tmul_ui.c | 5 +---- tests/tnext.c | 7 ++----- tests/tout_str.c | 5 +---- tests/tpow.c | 12 +++++++----- tests/tpow3.c | 10 +++------- tests/trandom.c | 18 +++++++++--------- tests/trint.c | 5 +---- tests/tround_prec.c | 3 +-- tests/tset.c | 5 +---- tests/tset_d.c | 5 +---- tests/tset_f.c | 3 +-- tests/tset_ld.c | 5 +---- tests/tset_q.c | 3 +-- tests/tset_si.c | 12 ++++-------- tests/tset_str.c | 5 +---- tests/tset_z.c | 5 +---- tests/tsgn.c | 7 +------ tests/tsin.c | 4 +--- tests/tsin_cos.c | 5 +---- tests/tsinh.c | 5 +---- tests/tsqrt.c | 5 +---- tests/tsqrt_ui.c | 3 +-- tests/tsub.c | 4 +--- tests/tsub1sp.c | 2 +- tests/tsub_ui.c | 5 +---- tests/tswap.c | 3 +-- tests/ttan.c | 4 +--- tests/ttanh.c | 5 +---- tests/ttrunc.c | 4 +--- tests/tui_div.c | 5 +---- tests/tui_pow.c | 10 +++------- tests/tui_sub.c | 5 +---- tests/tzeta.c | 5 +---- 88 files changed, 141 insertions(+), 348 deletions(-) (limited to 'tests') diff --git a/tests/memory.c b/tests/memory.c index 8284e3d13..a145e0328 100644 --- a/tests/memory.c +++ b/tests/memory.c @@ -4,6 +4,9 @@ Copyright 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU MP Library. +ChangeLog: + tests_memory_valid has been commented out since it is not used + The GNU MP Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your @@ -21,12 +24,12 @@ MA 02111-1307, USA. */ #include #include /* for abort */ +#include + #include "gmp.h" #include "gmp-impl.h" -#include "mpfr.h" #include "mpfr-test.h" - /* Each block allocated is a separate malloc, for the benefit of a redzoning malloc debugger during development or when bug hunting. @@ -37,7 +40,6 @@ MA 02111-1307, USA. */ when tests_memory_end() is called. Test programs must be sure to have "clear"s for all temporary variables used. */ - struct header { void *ptr; size_t size; @@ -60,11 +62,13 @@ tests_memory_find (void *ptr) return NULL; } +/* static int tests_memory_valid (void *ptr) { return (tests_memory_find (ptr) != NULL); } +*/ static void * tests_allocate (size_t size) diff --git a/tests/mpf_compat.h b/tests/mpf_compat.h index 21b851fea..6fc145e9d 100644 --- a/tests/mpf_compat.h +++ b/tests/mpf_compat.h @@ -61,6 +61,8 @@ main () if (prec2 < prec) { printf ("Error in get_prec: %lu < %lu\n", prec2, prec); + mpf_clear (y); + mpf_clear (x); exit (1); } @@ -69,6 +71,8 @@ main () if (prec2 < 2 * prec) { printf ("Error in set_prec: %lu < %lu\n", prec2, 2 * prec); + mpf_clear (y); + mpf_clear (x); exit (1); } @@ -77,6 +81,8 @@ main () if (prec2 < prec) { printf ("Error in set_prec_raw: %lu < %lu\n", prec2, prec); + mpf_clear (y); + mpf_clear (x); exit (1); } @@ -184,6 +190,7 @@ main () /* clear all variables */ + done: mpf_clear (y); mpf_clear (x); diff --git a/tests/reuse.c b/tests/reuse.c index 01d0a4c79..608c05eb3 100644 --- a/tests/reuse.c +++ b/tests/reuse.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" typedef void (*fct_t)(); diff --git a/tests/rnd_mode.c b/tests/rnd_mode.c index 94f5981e5..b949b6b8b 100644 --- a/tests/rnd_mode.c +++ b/tests/rnd_mode.c @@ -19,18 +19,8 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" #include "mpfr-test.h" -/* Note: "gmp-impl.h" must be included because MPFR_HAVE_FESETROUND - may be defined from it (if MPFR is built with GMP). */ - -#ifdef MPFR_HAVE_FESETROUND -#include -#endif - /* It is important to test each FE_* macro -- see the ISO C99 standard. For instance, with some ARM implementations, only FE_TONEAREST may be defined. */ diff --git a/tests/tabs.c b/tests/tabs.c index d26891bd8..f6d2d1ed9 100644 --- a/tests/tabs.c +++ b/tests/tabs.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tacos.c b/tests/tacos.c index 67241dbe5..62b372ba9 100644 --- a/tests/tacos.c +++ b/tests/tacos.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_acos diff --git a/tests/tacosh.c b/tests/tacosh.c index 37e9ef5ee..e4ffd5f61 100644 --- a/tests/tacosh.c +++ b/tests/tacosh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_acosh diff --git a/tests/tadd.c b/tests/tadd.c index c910cc264..df32b5e97 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -25,10 +25,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* Parameter "z1" of check() used to be last in the argument list, but that @@ -61,10 +58,19 @@ _check (double x, double y, double z1, mp_rnd_t rnd_mode, unsigned int px, mpfr_set_d (yy, z2, GMP_RNDN); if (!mpfr_cmp (zz, yy) && cert && z1!=z2 && !(Isnan(z1) && Isnan(z2))) { + /* If the format is not IEEE, we can't really check if it fails + (The mantissa could be != 53 bits and the base could be 10)*/ +#if _GMP_IEEE_FLOATS printf ("expected sum is %1.20e, got %1.20e\n", z1, z2); printf ("mpfr_add failed for x=%1.20e y=%1.20e with rnd_mode=%s\n", x, y, mpfr_print_rnd_mode (rnd_mode)); exit (1); +#else + printf ("Warning: expected sum is %1.20e, got %1.20e\n", z1, z2); + printf ("mpfr_add could have failed for x=%1.20e y=%1.20e" + "with rnd_mode=%s\n", + x, y, mpfr_print_rnd_mode (rnd_mode)); +#endif } mpfr_clear (xx); mpfr_clear (yy); diff --git a/tests/tadd_ui.c b/tests/tadd_ui.c index 67c8fc0b6..ec3b5683c 100644 --- a/tests/tadd_ui.c +++ b/tests/tadd_ui.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check(x,y,r) check3(x,y,r,0.0) diff --git a/tests/tagm.c b/tests/tagm.c index 904a9ad6a..2981b0ffc 100644 --- a/tests/tagm.c +++ b/tests/tagm.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check(a,b,r) check4(a,b,r,0.0) diff --git a/tests/tasin.c b/tests/tasin.c index bba0c5221..a3fc361dc 100644 --- a/tests/tasin.c +++ b/tests/tasin.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_asin diff --git a/tests/tasinh.c b/tests/tasinh.c index b65088486..45eaffcc1 100644 --- a/tests/tasinh.c +++ b/tests/tasinh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_asinh diff --git a/tests/tatan.c b/tests/tatan.c index 47aeac36d..98d143514 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tatanh.c b/tests/tatanh.c index f8e99c4b8..6cf23d554 100644 --- a/tests/tatanh.c +++ b/tests/tatanh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_atanh diff --git a/tests/tcan_round.c b/tests/tcan_round.c index 4afd6ad1e..f9c2b4a40 100644 --- a/tests/tcan_round.c +++ b/tests/tcan_round.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int diff --git a/tests/tcbrt.c b/tests/tcbrt.c index 6b9d6bb13..d6ee3f034 100644 --- a/tests/tcbrt.c +++ b/tests/tcbrt.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tcheck.c b/tests/tcheck.c index d883f7317..62927209a 100644 --- a/tests/tcheck.c +++ b/tests/tcheck.c @@ -21,7 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "mpfr-impl.h" + #include "mpfr-test.h" #define ERROR(s) fprintf(stderr, "mpfr_check failed " s " Prec=%lu\n", pr), abort() diff --git a/tests/tcmp.c b/tests/tcmp.c index f9bdfc234..75bfa7020 100644 --- a/tests/tcmp.c +++ b/tests/tcmp.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int diff --git a/tests/tcmp2.c b/tests/tcmp2.c index a2ae6e6cc..401f1f0d7 100644 --- a/tests/tcmp2.c +++ b/tests/tcmp2.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* set bit n of x to b, where bit 0 is the most significant one */ @@ -169,13 +166,13 @@ tcmp2 (double x, double y, int i) exit (1); } } - else if (j != i) + else if (j != (unsigned) i) { printf ("Error in mpfr_cmp2 for\nx="); mpfr_out_str (stdout, 2, 0, xx, GMP_RNDN); printf ("\ny="); mpfr_out_str (stdout, 2, 0, yy, GMP_RNDN); - printf ("\ngot %lu instead of %u\n", j, i); + printf ("\ngot %lu instead of %d\n", j, i); exit (1); } mpfr_clear(xx); mpfr_clear(yy); diff --git a/tests/tcmp_d.c b/tests/tcmp_d.c index 3c5a3b742..acae591d6 100644 --- a/tests/tcmp_d.c +++ b/tests/tcmp_d.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tcmp_ui.c b/tests/tcmp_ui.c index 49d4a251a..a3dcf86b4 100644 --- a/tests/tcmp_ui.c +++ b/tests/tcmp_ui.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tcomparisons.c b/tests/tcomparisons.c index 0de9e6b70..3dcc37e7a 100644 --- a/tests/tcomparisons.c +++ b/tests/tcomparisons.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tconst_euler.c b/tests/tconst_euler.c index 8dd947f8e..5357029ef 100644 --- a/tests/tconst_euler.c +++ b/tests/tconst_euler.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int diff --git a/tests/tconst_log2.c b/tests/tconst_log2.c index 71695d52d..2d6483fcb 100644 --- a/tests/tconst_log2.c +++ b/tests/tconst_log2.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* tlog2 [prec] [rnd] [0 = no print] */ diff --git a/tests/tconst_pi.c b/tests/tconst_pi.c index 95c3df84c..aa97cda8b 100644 --- a/tests/tconst_pi.c +++ b/tests/tconst_pi.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" /* tconst_pi [prec] [rnd] [0 = no print] */ diff --git a/tests/tcos.c b/tests/tcos.c index 5b8985a5a..dd8c64b43 100644 --- a/tests/tcos.c +++ b/tests/tcos.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tcosh.c b/tests/tcosh.c index 441966cd5..6203bc241 100644 --- a/tests/tcosh.c +++ b/tests/tcosh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_cosh diff --git a/tests/tdiv.c b/tests/tdiv.c index d8bf36eaa..e7baf74ad 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check53(n, d, rnd, res) check4(n, d, rnd, 53, res) diff --git a/tests/tdiv_ui.c b/tests/tdiv_ui.c index 7796fb388..fc624783a 100644 --- a/tests/tdiv_ui.c +++ b/tests/tdiv_ui.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tdump.c b/tests/tdump.c index 9ab6d6372..624e79099 100644 --- a/tests/tdump.c +++ b/tests/tdump.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/teq.c b/tests/teq.c index 6ccae2b21..0ef41df6b 100644 --- a/tests/teq.c +++ b/tests/teq.c @@ -21,16 +21,14 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void teq (mpfr_t x) { mpfr_t y; - long k, px, mx; + unsigned long k, px, mx; mpfr_init2(y, MPFR_PREC(x)); diff --git a/tests/terf.c b/tests/terf.c index 4cf98821e..5d856d3c0 100644 --- a/tests/terf.c +++ b/tests/terf.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_erf diff --git a/tests/tests.c b/tests/tests.c index edb9b86ad..79f267356 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -24,6 +24,7 @@ MA 02111-1307, USA. */ #endif #include +#include #include #if TIME_WITH_SYS_TIME @@ -37,17 +38,8 @@ MA 02111-1307, USA. */ # endif #endif -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" #include "mpfr-test.h" -#if HAVE_SYS_FPU_H -#include /* for mips fpc_csr */ -#endif - - void tests_rand_start _MPFR_PROTO ((void)); void tests_rand_end _MPFR_PROTO ((void)); @@ -272,7 +264,7 @@ d_trace (const char *name, double d) u.d = d; printf ("["); - for (i = 0; i < sizeof (u.b); i++) + for (i = 0; i < (int) sizeof (u.b); i++) { if (i != 0) printf (" "); @@ -295,7 +287,7 @@ ld_trace (const char *name, long double ld) u.ld = ld; printf ("["); - for (i = 0; i < sizeof (u.b); i++) + for (i = 0; i < (int) sizeof (u.b); i++) { if (i != 0) printf (" "); diff --git a/tests/texceptions.c b/tests/texceptions.c index 6fee9f506..82e6cd8c1 100644 --- a/tests/texceptions.c +++ b/tests/texceptions.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/texp.c b/tests/texp.c index 54ace9f8c..1ddb63589 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int maxu=0; diff --git a/tests/texp2.c b/tests/texp2.c index 54d752e25..33674a014 100644 --- a/tests/texp2.c +++ b/tests/texp2.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_exp2 diff --git a/tests/texpm1.c b/tests/texpm1.c index fdb69d470..ea21cefe9 100644 --- a/tests/texpm1.c +++ b/tests/texpm1.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_expm1 diff --git a/tests/tfactorial.c b/tests/tfactorial.c index cacc4374f..9d7243fce 100644 --- a/tests/tfactorial.c +++ b/tests/tfactorial.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_fac_ui @@ -73,7 +70,8 @@ main (int argc, char *argv[]) /* fact(n) ends with floor(n/2)+floor(n/4)+... zeros */ for (k=n/2, zeros=0; k; k >>= 1) zeros += k; - if (MPFR_EXP(y) <= prec + zeros) /* result should be exact */ + if (MPFR_EXP(y) <= (mp_exp_t) (prec + zeros)) + /* result should be exact */ { if (inexact) { diff --git a/tests/tfma.c b/tests/tfma.c index aa02ec43a..4a17d030d 100644 --- a/tests/tfma.c +++ b/tests/tfma.c @@ -23,12 +23,8 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" -#include "mpfr-test.h" +#include "mpfr-test.h" int main (int argc, char *argv[]) @@ -245,9 +241,8 @@ main (int argc, char *argv[]) int inexact, compare; unsigned int n; - int p0=2; - int p1=200; - int N=200; + mp_prec_t p0=2, p1=200; + unsigned int N=200; mpfr_init (t); mpfr_init (slong); diff --git a/tests/tfrac.c b/tests/tfrac.c index b6b3a581b..d17aa740d 100644 --- a/tests/tfrac.c +++ b/tests/tfrac.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" #define PIP 70 diff --git a/tests/tgamma.c b/tests/tgamma.c index 26f1580c0..8fd703ba6 100644 --- a/tests/tgamma.c +++ b/tests/tgamma.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int mpfr_gamma (mpfr_ptr, mpfr_srcptr, mp_rnd_t); diff --git a/tests/tgeneric.c b/tests/tgeneric.c index a5e9c6537..f1fc39f9e 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -20,7 +20,7 @@ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ static void -test_generic (int p0, int p1, int N) +test_generic (mp_prec_t p0, mp_prec_t p1, unsigned int N) { mp_prec_t prec, yprec; mpfr_t x, y, z, t; diff --git a/tests/tget_d.c b/tests/tget_d.c index 637038f3e..8ff9c2ccb 100644 --- a/tests/tget_d.c +++ b/tests/tget_d.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static int diff --git a/tests/tget_d_2exp.c b/tests/tget_d_2exp.c index 2a7b42fcc..989f990a0 100644 --- a/tests/tget_d_2exp.c +++ b/tests/tget_d_2exp.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" @@ -44,7 +41,7 @@ check_round (void) for (rnd_mode = 0; rnd_mode < 4; rnd_mode++) { - for (i = 0; i < numberof (data); i++) + for (i = 0; i < (int) numberof (data); i++) { mpfr_set_ui (f, 1L, GMP_RNDZ); mpfr_mul_2exp (f, f, data[i], GMP_RNDZ); diff --git a/tests/tget_str.c b/tests/tget_str.c index d30629a41..db9df9eff 100644 --- a/tests/tget_str.c +++ b/tests/tget_str.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void @@ -400,7 +397,7 @@ check_special (int b, mp_prec_t p) { /* x = b^i (exact) */ for (r=0; r<4; r++) - for (m=(i < 3) ? 2 : i-1; m<=i+1; m++) + for (m= (i<3)? 2 : i-1 ; (int) m <= i+1 ; m++) { mpfr_get_str (s, &e, b, m, x, r); /* s should be 1 followed by (m-1) zeros, and e should be i+1 */ diff --git a/tests/thyperbolic.c b/tests/thyperbolic.c index eb003aa5c..12c9f9585 100644 --- a/tests/thyperbolic.c +++ b/tests/thyperbolic.c @@ -18,11 +18,9 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static int diff --git a/tests/thypot.c b/tests/thypot.c index 15abd95e0..26a7d30ff 100644 --- a/tests/thypot.c +++ b/tests/thypot.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_hypot diff --git a/tests/tinits.c b/tests/tinits.c index 435f345f9..3433df89c 100644 --- a/tests/tinits.c +++ b/tests/tinits.c @@ -19,10 +19,6 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" #include "mpfr-test.h" int diff --git a/tests/tisnan.c b/tests/tisnan.c index 31e40e7bd..7cee98202 100644 --- a/tests/tisnan.c +++ b/tests/tisnan.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tlog.c b/tests/tlog.c index 79cfa0502..4bd6e475a 100644 --- a/tests/tlog.c +++ b/tests/tlog.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check(a,r) check2(a,r,0.0) diff --git a/tests/tlog10.c b/tests/tlog10.c index 466847df7..63f10bc17 100644 --- a/tests/tlog10.c +++ b/tests/tlog10.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_log10 diff --git a/tests/tlog1p.c b/tests/tlog1p.c index c079b9d02..6ddf7a4f3 100644 --- a/tests/tlog1p.c +++ b/tests/tlog1p.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_log1p diff --git a/tests/tlog2.c b/tests/tlog2.c index f4aae6657..5f6be8d35 100644 --- a/tests/tlog2.c +++ b/tests/tlog2.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_log2 diff --git a/tests/tmul.c b/tests/tmul.c index 328326312..8f40d2f12 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* Workaround for sparc gcc 2.95.x bug, see notes in tadd.c. */ diff --git a/tests/tmul_2exp.c b/tests/tmul_2exp.c index 751978ae4..f333d61bf 100644 --- a/tests/tmul_2exp.c +++ b/tests/tmul_2exp.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* checks that x*y gives the same results in double diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c index f8defca92..d6beda616 100644 --- a/tests/tmul_ui.c +++ b/tests/tmul_ui.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tnext.c b/tests/tnext.c index 0ae9b0a31..6a00d6c34 100644 --- a/tests/tnext.c +++ b/tests/tnext.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* Generic tests for mpfr_nextabove and mpfr_nextbelow */ @@ -81,7 +78,7 @@ inverse_test (void) int i, neg, below; mp_prec_t prec; - for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) + for (i = 0; i < (int) (sizeof(tests) / sizeof(tests[0])); i++) for (neg = 0; neg <= 1; neg++) for (below = 0; below <= 1; below++) for (prec = MPFR_PREC_MIN; prec < 200; prec += 3) diff --git a/tests/tout_str.c b/tests/tout_str.c index 37b7e71f7..82362390f 100644 --- a/tests/tout_str.c +++ b/tests/tout_str.c @@ -24,10 +24,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" FILE *fout; diff --git a/tests/tpow.c b/tests/tpow.c index beea9be20..7ab0cba52 100644 --- a/tests/tpow.c +++ b/tests/tpow.c @@ -21,9 +21,9 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" +#include +#include + #include "mpfr-test.h" static void @@ -289,11 +289,13 @@ particular_cases (void) exit (1); } -void f(void) +void f (void) { } -static void +void underflows (void); + +void underflows (void) { mpfr_t x, y; diff --git a/tests/tpow3.c b/tests/tpow3.c index 08b91de3d..02010ec69 100644 --- a/tests/tpow3.c +++ b/tests/tpow3.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" @@ -41,9 +38,8 @@ main (int argc, char *argv[]) int inexact, compare, compare2; unsigned int n, err; - int p0=2; - int p1=100; - int N=25; + mp_prec_t p0=2, p1=100; + unsigned int N=25; tests_start_mpfr (); diff --git a/tests/trandom.c b/tests/trandom.c index c61c17af2..19d80aa87 100644 --- a/tests/trandom.c +++ b/tests/trandom.c @@ -22,13 +22,11 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void -test_random (unsigned long nbtests, unsigned long prec, int verbose) +test_random (long nbtests, mp_prec_t prec, int verbose) { mpfr_t x; int *tab, size_tab, k; @@ -82,7 +80,7 @@ test_random (unsigned long nbtests, unsigned long prec, int verbose) } static void -test_random2 (unsigned long nbtests, unsigned long prec, int verbose) +test_random2 (long nbtests, mp_prec_t prec, int verbose) { mpfr_t x; int *tab, size_tab, k, sh, xn; @@ -150,7 +148,7 @@ test_random2 (unsigned long nbtests, unsigned long prec, int verbose) } static void -test_urandomb (unsigned long nbtests, unsigned long prec, int verbose) +test_urandomb (long nbtests, mp_prec_t prec, int verbose) { mpfr_t x; int *tab, size_tab, k, sh, xn; @@ -217,7 +215,9 @@ test_urandomb (unsigned long nbtests, unsigned long prec, int verbose) int main (int argc, char *argv[]) { - unsigned long nbtests, prec; int verbose = 0; + long nbtests; + mp_prec_t prec; + int verbose = 0; tests_start_mpfr (); @@ -227,7 +227,7 @@ main (int argc, char *argv[]) nbtests = 10000; if (argc > 1) { - int a = atoi(argv[1]); + long a = atol(argv[1]); if (a != 0) nbtests = a; } @@ -235,7 +235,7 @@ main (int argc, char *argv[]) if (argc <= 2) prec = 1000; else - prec = atoi(argv[2]); + prec = atol(argv[2]); test_random (nbtests, prec, verbose); test_random2 (nbtests, prec, verbose); diff --git a/tests/trint.c b/tests/trint.c index b02b42221..fa7f91f06 100644 --- a/tests/trint.c +++ b/tests/trint.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #if __STDC_VERSION__ >= 199901L diff --git a/tests/tround_prec.c b/tests/tround_prec.c index 0ecf56e34..bc89cfc3e 100644 --- a/tests/tround_prec.c +++ b/tests/tround_prec.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tset.c b/tests/tset.c index 379c1c623..877becfa7 100644 --- a/tests/tset.c +++ b/tests/tset.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int diff --git a/tests/tset_d.c b/tests/tset_d.c index af44a8a6b..e5ac12d6b 100644 --- a/tests/tset_d.c +++ b/tests/tset_d.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" int diff --git a/tests/tset_f.c b/tests/tset_f.c index e3fa5f05c..f61942cb8 100644 --- a/tests/tset_f.c +++ b/tests/tset_f.c @@ -22,8 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/tset_ld.c b/tests/tset_ld.c index 7cb6a461e..d406a3509 100644 --- a/tests/tset_ld.c +++ b/tests/tset_ld.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tset_q.c b/tests/tset_q.c index e95b658a4..2e718ef9c 100644 --- a/tests/tset_q.c +++ b/tests/tset_q.c @@ -22,8 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" static void diff --git a/tests/tset_si.c b/tests/tset_si.c index 064e02717..1a0864280 100644 --- a/tests/tset_si.c +++ b/tests/tset_si.c @@ -22,30 +22,26 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* FIXME: Comparing against mpfr_get_si/ui is not ideal, it'd be better to have all tests examine the bits in mpfr_t for what should come out. */ - int main (int argc, char *argv[]) { mpfr_t x; - long k, z, d; - unsigned long zl, dl, N; + long k, z, d, N; + unsigned long zl, dl; int inex; tests_start_mpfr (); mpfr_init2 (x, 100); - N = (argc==1) ? 200000 : atoi (argv[1]); + N = (argc==1) ? 200000 : atol (argv[1]); for (k = 1; k <= N; k++) { diff --git a/tests/tset_str.c b/tests/tset_str.c index 13f9cfeb7..be36a1a33 100644 --- a/tests/tset_str.c +++ b/tests/tset_str.c @@ -24,10 +24,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define N 30000 diff --git a/tests/tset_z.c b/tests/tset_z.c index a23b4258c..73b3f11f4 100644 --- a/tests/tset_z.c +++ b/tests/tset_z.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" diff --git a/tests/tsgn.c b/tests/tsgn.c index dd64cf35b..71c12d61e 100644 --- a/tests/tsgn.c +++ b/tests/tsgn.c @@ -22,12 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include -#include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tsin.c b/tests/tsin.c index 33cd4d938..7a181a46d 100644 --- a/tests/tsin.c +++ b/tests/tsin.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c index a94ad2282..e59570fff 100644 --- a/tests/tsin_cos.c +++ b/tests/tsin_cos.c @@ -21,10 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tsinh.c b/tests/tsinh.c index 0fccfae23..1739e35c6 100644 --- a/tests/tsinh.c +++ b/tests/tsinh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_sinh diff --git a/tests/tsqrt.c b/tests/tsqrt.c index c100a37b4..f1900030b 100644 --- a/tests/tsqrt.c +++ b/tests/tsqrt.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check(a,r) check3(a,r,-1.0) diff --git a/tests/tsqrt_ui.c b/tests/tsqrt_ui.c index 82e564c65..d3ae201a4 100644 --- a/tests/tsqrt_ui.c +++ b/tests/tsqrt_ui.c @@ -22,8 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int maxulp=0; diff --git a/tests/tsub.c b/tests/tsub.c index 2126d6cb2..05f5acd21 100644 --- a/tests/tsub.c +++ b/tests/tsub.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c index 0be1dd5e8..27a23017c 100644 --- a/tests/tsub1sp.c +++ b/tests/tsub1sp.c @@ -21,7 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "mpfr-impl.h" + #include "mpfr-test.h" void check_special(void); diff --git a/tests/tsub_ui.c b/tests/tsub_ui.c index 298a884cd..d58315fc3 100644 --- a/tests/tsub_ui.c +++ b/tests/tsub_ui.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define check(x,y,r) check3(x,y,r,0.0) diff --git a/tests/tswap.c b/tests/tswap.c index 06efb5518..5edda71e2 100644 --- a/tests/tswap.c +++ b/tests/tswap.c @@ -21,8 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" + #include "mpfr-test.h" int diff --git a/tests/ttan.c b/tests/ttan.c index 8f435037a..cbc1c678f 100644 --- a/tests/ttan.c +++ b/tests/ttan.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_tan diff --git a/tests/ttanh.c b/tests/ttanh.c index f27a970f9..15e6f5efd 100644 --- a/tests/ttanh.c +++ b/tests/ttanh.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define TEST_FUNCTION mpfr_tanh diff --git a/tests/ttrunc.c b/tests/ttrunc.c index 347f4000c..f1cf9d20e 100644 --- a/tests/ttrunc.c +++ b/tests/ttrunc.c @@ -21,9 +21,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" #define SIZEX 100 diff --git a/tests/tui_div.c b/tests/tui_div.c index aa1376f45..961dc1f83 100644 --- a/tests/tui_div.c +++ b/tests/tui_div.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" /* checks that y/x gives the same results in double diff --git a/tests/tui_pow.c b/tests/tui_pow.c index d072c2810..249a020e5 100644 --- a/tests/tui_pow.c +++ b/tests/tui_pow.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void @@ -167,9 +164,8 @@ main (int argc, char *argv[]) mp_rnd_t rnd; unsigned int n; - int p0=2; - int p1=100; - int N=20; + mp_prec_t p0=2, p1=100; + unsigned int N=20; mpfr_init2 (z, 38); mpfr_init2 (t, 6); diff --git a/tests/tui_sub.c b/tests/tui_sub.c index 97ab92556..410f41d49 100644 --- a/tests/tui_sub.c +++ b/tests/tui_sub.c @@ -23,10 +23,7 @@ MA 02111-1307, USA. */ #include #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void diff --git a/tests/tzeta.c b/tests/tzeta.c index 73005c92a..790e5447b 100644 --- a/tests/tzeta.c +++ b/tests/tzeta.c @@ -22,10 +22,7 @@ MA 02111-1307, USA. */ #include #include -#include "gmp.h" -#include "gmp-impl.h" -#include "mpfr.h" -#include "mpfr-impl.h" + #include "mpfr-test.h" static void -- cgit v1.2.1