diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-07 15:13:02 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-05-07 15:13:02 +0000 |
commit | 3ffa08c3f9f5d2790dca53a5a39f95ab54390acd (patch) | |
tree | de0193ea3a91c163a9b23921b1517e85905403b0 /tests | |
parent | 5b51d2ffc3e7364b683023047aaffc78d1a894a6 (diff) | |
download | mpfr-3ffa08c3f9f5d2790dca53a5a39f95ab54390acd.tar.gz |
New exponent type mpfr_exp_t for MPFR (replacing GMP's mp_exp_t).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6789 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
61 files changed, 124 insertions, 124 deletions
diff --git a/tests/mpfr-test.h b/tests/mpfr-test.h index 3c88ced10..c1f5dd6ad 100644 --- a/tests/mpfr-test.h +++ b/tests/mpfr-test.h @@ -72,7 +72,7 @@ int mpfr_set_machine_rnd_mode _MPFR_PROTO ((mpfr_rnd_t)); void mpfr_test_init _MPFR_PROTO ((void)); mp_limb_t randlimb _MPFR_PROTO ((void)); void randseed _MPFR_PROTO ((unsigned int)); -void mpfr_random2 _MPFR_PROTO ((mpfr_ptr, mp_size_t, mp_exp_t, gmp_randstate_t)); +void mpfr_random2 _MPFR_PROTO ((mpfr_ptr, mp_size_t, mpfr_exp_t, gmp_randstate_t)); int ulp _MPFR_PROTO ((double, double)); double dbl _MPFR_PROTO ((double, int)); double Ulp _MPFR_PROTO ((double)); @@ -81,12 +81,12 @@ void d_trace _MPFR_PROTO ((const char *, double)); void ld_trace _MPFR_PROTO ((const char *, long double)); FILE *src_fopen _MPFR_PROTO ((const char *, const char *)); -void set_emin _MPFR_PROTO ((mp_exp_t)); -void set_emax _MPFR_PROTO ((mp_exp_t)); -void tests_default_random _MPFR_PROTO ((mpfr_ptr, int, mp_exp_t, mp_exp_t)); +void set_emin _MPFR_PROTO ((mpfr_exp_t)); +void set_emax _MPFR_PROTO ((mpfr_exp_t)); +void tests_default_random _MPFR_PROTO ((mpfr_ptr, int, mpfr_exp_t, mpfr_exp_t)); void data_check _MPFR_PROTO ((char *, int (*) (FLIST), char *)); void bad_cases _MPFR_PROTO ((int (*)(FLIST), int (*)(FLIST), - char *, int, mp_exp_t, mp_exp_t, + char *, int, mpfr_exp_t, mpfr_exp_t, mpfr_prec_t, mpfr_prec_t, mpfr_prec_t, int)); int mpfr_cmp_str _MPFR_PROTO ((mpfr_srcptr x, const char *, int, mpfr_rnd_t)); @@ -149,7 +149,7 @@ mpfr_print_raw (mpfr_srcptr x) printf ((wd & t) == 0 ? "0" : "1"); if (--px == 0) { - mp_exp_t ex; + mpfr_exp_t ex; ex = MPFR_GET_EXP (x); MPFR_ASSERTN (ex >= LONG_MIN && ex <= LONG_MAX); diff --git a/tests/random2.c b/tests/random2.c index cc0cbdb37..b04dbbd4c 100644 --- a/tests/random2.c +++ b/tests/random2.c @@ -31,7 +31,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #endif void -mpfr_random2 (mpfr_ptr x, mp_size_t size, mp_exp_t exp, +mpfr_random2 (mpfr_ptr x, mp_size_t size, mpfr_exp_t exp, gmp_randstate_t rstate) { mp_size_t xn, k, ri; diff --git a/tests/tacos.c b/tests/tacos.c index 5f544897e..dd500ff4c 100644 --- a/tests/tacos.c +++ b/tests/tacos.c @@ -74,7 +74,7 @@ static void special_overflow (void) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tadd.c b/tests/tadd.c index 983dacf70..9bfaf3c1d 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -677,7 +677,7 @@ check_1111 (void) for (n = 0; n < NUM; n++) { mpfr_prec_t prec_a, prec_b, prec_c; - mp_exp_t tb=0, tc, diff; + mpfr_exp_t tb=0, tc, diff; mpfr_t a, b, c, s; int m = 512; int sb, sc; diff --git a/tests/tadd1sp.c b/tests/tadd1sp.c index ba545e597..023091821 100644 --- a/tests/tadd1sp.c +++ b/tests/tadd1sp.c @@ -32,7 +32,7 @@ static void check_overflow (void) { mpfr_t x, y, z1, z2; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tasin.c b/tests/tasin.c index 9378d61e5..43cd6f6e6 100644 --- a/tests/tasin.c +++ b/tests/tasin.c @@ -171,7 +171,7 @@ static void special_overflow (void) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tatan.c b/tests/tatan.c index 9f4b1e326..a03d30b3a 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -219,7 +219,7 @@ static void special_overflow (void) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -428,7 +428,7 @@ static void smallvals_atan2 (void) { mpfr_t a, x, y; - mp_exp_t old_emin; + mpfr_exp_t old_emin; mpfr_inits (a, x, y, (mpfr_ptr) 0); mpfr_set_ui (y, 0, MPFR_RNDN); diff --git a/tests/tcan_round.c b/tests/tcan_round.c index 4809a120c..8287a7db0 100644 --- a/tests/tcan_round.c +++ b/tests/tcan_round.c @@ -33,7 +33,7 @@ check_round_p (void) mp_limb_t buf[MAX_LIMB_SIZE]; mp_size_t n, i; mpfr_prec_t p; - mp_exp_t err; + mpfr_exp_t err; int r1, r2; for (n = 2 ; n <= MAX_LIMB_SIZE ; n++) diff --git a/tests/tcos.c b/tests/tcos.c index 3eae3bb7a..445d85161 100644 --- a/tests/tcos.c +++ b/tests/tcos.c @@ -141,7 +141,7 @@ static void special_overflow (void) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -166,7 +166,7 @@ overflowed_cos0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); diff --git a/tests/tcosh.c b/tests/tcosh.c index b359b598d..03a2fcf71 100644 --- a/tests/tcosh.c +++ b/tests/tcosh.c @@ -141,7 +141,7 @@ special_overflow (void) 2. cosh(x) is not representable in the selected range of exp. 3. cosh(x) exp overflow even with the largest range of exp */ mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tcot.c b/tests/tcot.c index d31fcb1e9..c2421898d 100644 --- a/tests/tcot.c +++ b/tests/tcot.c @@ -82,9 +82,9 @@ check_specials (void) } static void -two2emin (mp_exp_t e) +two2emin (mpfr_exp_t e) { - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; mpfr_t x, y; int i, rnd; diff --git a/tests/tcoth.c b/tests/tcoth.c index 7495f4c4c..f2d18778e 100644 --- a/tests/tcoth.c +++ b/tests/tcoth.c @@ -136,7 +136,7 @@ underflowed_cothinf (void) { mpfr_t x, y; int i, inex, rnd, err = 0; - mp_exp_t old_emin; + mpfr_exp_t old_emin; old_emin = mpfr_get_emin (); diff --git a/tests/tdiv.c b/tests/tdiv.c index 4fbe3bed1..262f87900 100644 --- a/tests/tdiv.c +++ b/tests/tdiv.c @@ -630,7 +630,7 @@ static void check_nan (void) { mpfr_t a, d, q; - mp_exp_t emax, emin; + mpfr_exp_t emax, emin; int i; mpfr_init2 (a, 100L); @@ -855,7 +855,7 @@ test_20070603 (void) static void test_20070628 (void) { - mp_exp_t old_emax; + mpfr_exp_t old_emax; mpfr_t x, y; int inex, err = 0; diff --git a/tests/tests.c b/tests/tests.c index 7143777a5..588b0e928 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -94,7 +94,7 @@ set_fpu_prec (void) #endif -static mp_exp_t default_emin, default_emax; +static mpfr_exp_t default_emin, default_emax; static void tests_rand_start (void); static void tests_rand_end (void); @@ -465,7 +465,7 @@ src_fopen (const char *filename, const char *mode) } void -set_emin (mp_exp_t exponent) +set_emin (mpfr_exp_t exponent) { if (mpfr_set_emin (exponent)) { @@ -475,7 +475,7 @@ set_emin (mp_exp_t exponent) } void -set_emax (mp_exp_t exponent) +set_emax (mpfr_exp_t exponent) { if (mpfr_set_emax (exponent)) { @@ -489,7 +489,7 @@ set_emax (mp_exp_t exponent) If pos=0, all generated numbers are positive. */ void -tests_default_random (mpfr_ptr x, int pos, mp_exp_t emin, mp_exp_t emax) +tests_default_random (mpfr_ptr x, int pos, mpfr_exp_t emin, mpfr_exp_t emax) { MPFR_ASSERTN (emin <= emax); MPFR_ASSERTN (emin >= MPFR_EMIN_MIN); @@ -501,7 +501,7 @@ tests_default_random (mpfr_ptr x, int pos, mp_exp_t emin, mp_exp_t emax) mpfr_urandomb (x, RANDS); if (MPFR_IS_PURE_FP (x) && (emin >= 1 || (randlimb () & 1))) { - mp_exp_t e; + mpfr_exp_t e; e = MPFR_GET_EXP (x) + (emin + (long) (randlimb () % (emax - emin + 1))); /* Note: There should be no overflow here because both terms are @@ -791,14 +791,14 @@ data_check (char *f, int (*foo) (FLIST), char *name) */ void bad_cases (int (*fct)(FLIST), int (*inv)(FLIST), char *name, - int pos, mp_exp_t emin, mp_exp_t emax, + int pos, mpfr_exp_t emin, mpfr_exp_t emax, mpfr_prec_t pymin, mpfr_prec_t pymax, mpfr_prec_t psup, int n) { mpfr_t x, y, z; char *dbgenv; int i, dbg; - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); diff --git a/tests/texceptions.c b/tests/texceptions.c index 8458f0ba7..9d168a0ce 100644 --- a/tests/texceptions.c +++ b/tests/texceptions.c @@ -68,7 +68,7 @@ check_default_rnd (void) static void check_emin_emax (void) { - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); @@ -142,7 +142,7 @@ static void check_flags (void) { mpfr_t x; - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); @@ -295,7 +295,7 @@ int main (int argc, char *argv[]) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; tests_start_mpfr (); diff --git a/tests/texp.c b/tests/texp.c index dc75cad65..23f8a8117 100644 --- a/tests/texp.c +++ b/tests/texp.c @@ -222,7 +222,7 @@ static void check_special (void) { mpfr_t x, y, z; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -517,7 +517,7 @@ overflowed_exp0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); @@ -594,7 +594,7 @@ overflowed_exp0 (void) static void bug20080731 (void) { - mp_exp_t emin; + mpfr_exp_t emin; mpfr_t x, y1, y2; mpfr_prec_t prec = 64; @@ -752,7 +752,7 @@ underflow_up (int extended_emin) * because mpfr_sub (r, x, r, MPFR_RNDU); yields a null value. This is * fixed in r5453 by going to next Ziv's iteration. */ - for (precx = sizeof(mp_exp_t) * CHAR_BIT + 1; precx <= 81; precx += 8) + for (precx = sizeof(mpfr_exp_t) * CHAR_BIT + 1; precx <= 81; precx += 8) { mpfr_init2 (x, precx); mpfr_log (x, minpos, MPFR_RNDD); /* |ulp| <= 1/2 */ @@ -787,7 +787,7 @@ underflow_up (int extended_emin) { mpfr_set_ui_2exp (t, 1, - precy, MPFR_RNDN); /* 2^(-p) */ mpfr_set_ui_2exp (t2, 1, 1 - 2 * precy, MPFR_RNDN); /* 2^(-2p+1) */ - precx = sizeof(mp_exp_t) * CHAR_BIT + 2 * precy + 8; + precx = sizeof(mpfr_exp_t) * CHAR_BIT + 2 * precy + 8; mpfr_init2 (x, precx); mpfr_init2 (y, precy); for (i = 0; i <= 1; i++) @@ -884,7 +884,7 @@ underflow_up (int extended_emin) * due to a double-rounding problem in mpfr_mul_2si when rescaling * the result. */ - mpfr_inits2 (sizeof(mp_exp_t) * CHAR_BIT + 64, x, t, (mpfr_ptr) 0); + mpfr_inits2 (sizeof(mpfr_exp_t) * CHAR_BIT + 64, x, t, (mpfr_ptr) 0); for (i = 0; i <= 1; i++) { mpfr_log (x, minpos, i ? MPFR_RNDU : MPFR_RNDD); @@ -937,7 +937,7 @@ underflow_up (int extended_emin) static void underflow (void) { - mp_exp_t emin; + mpfr_exp_t emin; underflow_up (0); diff --git a/tests/texp10.c b/tests/texp10.c index 01c635fac..3ab732f58 100644 --- a/tests/texp10.c +++ b/tests/texp10.c @@ -36,7 +36,7 @@ special_overflow (void) { mpfr_t x, y; int inex; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -71,7 +71,7 @@ emax_m_eps (void) mpfr_t x, y; int inex, ov; - mpfr_init2 (x, sizeof(mp_exp_t) * CHAR_BIT * 4); + mpfr_init2 (x, sizeof(mpfr_exp_t) * CHAR_BIT * 4); mpfr_init2 (y, 8); mpfr_set_si (x, mpfr_get_emax (), MPFR_RNDN); @@ -95,7 +95,7 @@ static void exp_range (void) { mpfr_t x; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); set_emin (3); @@ -119,7 +119,7 @@ overfl_exp10_0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); @@ -196,7 +196,7 @@ int main (int argc, char *argv[]) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int inex, ov; tests_start_mpfr (); diff --git a/tests/texp2.c b/tests/texp2.c index 315a26540..79a7e519a 100644 --- a/tests/texp2.c +++ b/tests/texp2.c @@ -36,7 +36,7 @@ special_overflow (void) { mpfr_t x, y; int inex; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -71,7 +71,7 @@ emax_m_eps (void) mpfr_t x, y; int inex, ov; - mpfr_init2 (x, sizeof(mp_exp_t) * CHAR_BIT * 4); + mpfr_init2 (x, sizeof(mpfr_exp_t) * CHAR_BIT * 4); mpfr_init2 (y, 8); mpfr_set_si (x, mpfr_get_emax (), MPFR_RNDN); @@ -120,7 +120,7 @@ static void exp_range (void) { mpfr_t x; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); set_emin (3); @@ -144,7 +144,7 @@ overflowed_exp2_0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); @@ -221,7 +221,7 @@ int main (int argc, char *argv[]) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; tests_start_mpfr (); diff --git a/tests/tfactorial.c b/tests/tfactorial.c index 6763f95d3..98bec46db 100644 --- a/tests/tfactorial.c +++ b/tests/tfactorial.c @@ -122,7 +122,7 @@ overflowed_fac0 (void) { mpfr_t x, y; int inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); @@ -235,7 +235,7 @@ 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) <= (mp_exp_t) (prec + zeros)) + if (MPFR_EXP(y) <= (mpfr_exp_t) (prec + zeros)) /* result should be exact */ { if (inexact) diff --git a/tests/tfprintf.c b/tests/tfprintf.c index 3d639f13e..f6e2dd7e2 100644 --- a/tests/tfprintf.c +++ b/tests/tfprintf.c @@ -294,7 +294,7 @@ check_random (FILE *fout, int nb_tests) 'f', 'g' }; - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); diff --git a/tests/tfrac.c b/tests/tfrac.c index fabe5c7c9..48e49449a 100644 --- a/tests/tfrac.c +++ b/tests/tfrac.c @@ -180,7 +180,7 @@ bug20090918 (void) int inexy, inexz; int r, i; char *s[] = { "61680.352935791015625", "61680.999999" }; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); mpfr_init2 (x, 32); diff --git a/tests/tgamma.c b/tests/tgamma.c index 8c07bc778..c724d0e71 100644 --- a/tests/tgamma.c +++ b/tests/tgamma.c @@ -197,7 +197,7 @@ static void special_overflow (void) { mpfr_t x, y; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int inex; emin = mpfr_get_emin (); @@ -441,7 +441,7 @@ test20071231 (void) { mpfr_t x; int inex; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); mpfr_set_emin (-1000000); diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 2f9804b62..60aeb16f2 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -122,7 +122,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) int inexact, compare, compare2; unsigned int n; unsigned long ctrt = 0, ctrn = 0; - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); diff --git a/tests/tget_f.c b/tests/tget_f.c index 5f17ca1b2..6f59022ad 100644 --- a/tests/tget_f.c +++ b/tests/tget_f.c @@ -270,7 +270,7 @@ main (void) mpf_t x; mpfr_t y, z; unsigned long i; - mp_exp_t e; + mpfr_exp_t e; int inex; tests_start_mpfr (); diff --git a/tests/tget_str.c b/tests/tget_str.c index 76072a807..86fea8707 100644 --- a/tests/tget_str.c +++ b/tests/tget_str.c @@ -29,7 +29,7 @@ check3 (char *d, mpfr_rnd_t rnd, char *res) { mpfr_t x; char *str; - mp_exp_t e; + mpfr_exp_t e; mpfr_init2 (x, 53); mpfr_set_str (x, d, 10, rnd); @@ -49,7 +49,7 @@ check_small (void) { mpfr_t x; char *s; - mp_exp_t e; + mpfr_exp_t e; mpfr_prec_t p; mpfr_init (x); @@ -989,7 +989,7 @@ check_large (void) '3', '7', '2', '2', '7', '5', '6', '2', '3', '1', '2', '1', '3', '1', '4', '2', '6', '9', '2', '3', '\0' }; - mp_exp_t e; + mpfr_exp_t e; mpfr_init2 (x, 3322); mpfr_set_str (x, xm, 10, MPFR_RNDN); @@ -1077,7 +1077,7 @@ check_special (int b, mpfr_prec_t p) mpfr_t x; int i, j; char s[MAX_DIGITS + 2], s2[MAX_DIGITS + 2], c; - mp_exp_t e; + mpfr_exp_t e; int r; size_t m; @@ -1156,7 +1156,7 @@ check_bug_base2k (void) */ mpfr_t xx, yy, zz; char *s; - mp_exp_t e; + mpfr_exp_t e; mpfr_init2 (xx, 107); mpfr_init2 (yy, 79); @@ -1181,7 +1181,7 @@ check_reduced_exprange (void) { mpfr_t x; char *s; - mp_exp_t emax, e; + mpfr_exp_t emax, e; emax = mpfr_get_emax (); mpfr_init2 (x, 8); @@ -1208,7 +1208,7 @@ main (int argc, char *argv[]) mpfr_t x; mpfr_rnd_t r; char s[MAX_DIGITS + 2]; - mp_exp_t e, f; + mpfr_exp_t e, f; size_t m; mpfr_prec_t p; int i; @@ -1230,7 +1230,7 @@ main (int argc, char *argv[]) { m = 2 + (randlimb () % (MAX_DIGITS - 1)); mpfr_urandomb (x, RANDS); - e = (mp_exp_t) (randlimb () % 21) - 10; + e = (mpfr_exp_t) (randlimb () % 21) - 10; mpfr_set_exp (x, (e == -10) ? mpfr_get_emin () : ((e == 10) ? mpfr_get_emax () : e)); b = 2 + (randlimb () % 35); diff --git a/tests/tget_z.c b/tests/tget_z.c index 050dd9a05..887d624be 100644 --- a/tests/tget_z.c +++ b/tests/tget_z.c @@ -31,7 +31,7 @@ check_diff (void) int inex; mpfr_t x; mpz_t z; - mp_exp_t emin; + mpfr_exp_t emin; mpz_init (z); mpfr_init2 (x, 2); diff --git a/tests/thypot.c b/tests/thypot.c index fcfa2097a..f93890f00 100644 --- a/tests/thypot.c +++ b/tests/thypot.c @@ -287,7 +287,7 @@ check_overflow (void) static void alltst (void) { - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; ext = 0; test_small (); diff --git a/tests/tinternals.c b/tests/tinternals.c index 577a5a924..ff3aae763 100644 --- a/tests/tinternals.c +++ b/tests/tinternals.c @@ -51,7 +51,7 @@ static void test_round_near_x (void) { mpfr_t x, y, z, eps; - mp_exp_t e; + mpfr_exp_t e; int failures = 0, mx, neg, err, dir, r, inex, inex2; char buffer[7], *p; diff --git a/tests/tlgamma.c b/tests/tlgamma.c index 13c67096a..b003e61a0 100644 --- a/tests/tlgamma.c +++ b/tests/tlgamma.c @@ -58,7 +58,7 @@ special (void) mpfr_t x, y; int inex; int sign; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; mpfr_init (x); mpfr_init (y); diff --git a/tests/tlog.c b/tests/tlog.c index b457e1277..8b0065295 100644 --- a/tests/tlog.c +++ b/tests/tlog.c @@ -179,7 +179,7 @@ special (void) { mpfr_t x, y; int inex; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tmodf.c b/tests/tmodf.c index 8c47370b5..92d1574f3 100644 --- a/tests/tmodf.c +++ b/tests/tmodf.c @@ -108,7 +108,7 @@ check_special_exprange (void) int inexact, ov; unsigned int eflags, gflags; mpfr_t xi, xf, x; - mp_exp_t emax; + mpfr_exp_t emax; emax = mpfr_get_emax (); mpfr_init2 (xi, 7); diff --git a/tests/tmul.c b/tests/tmul.c index 6689cda39..dbccf3ce2 100644 --- a/tests/tmul.c +++ b/tests/tmul.c @@ -280,7 +280,7 @@ static void check_max(void) { mpfr_t xx, yy, zz; - mp_exp_t emin; + mpfr_exp_t emin; mpfr_init2(xx, 4); mpfr_init2(yy, 4); diff --git a/tests/tmul_2exp.c b/tests/tmul_2exp.c index bbb2e1106..d72442a3d 100644 --- a/tests/tmul_2exp.c +++ b/tests/tmul_2exp.c @@ -46,10 +46,10 @@ test_mul (int i, int div, mpfr_ptr y, mpfr_srcptr x, } static void -underflow (mp_exp_t e) +underflow (mpfr_exp_t e) { mpfr_t x, y, z1, z2; - mp_exp_t emin; + mpfr_exp_t emin; int i, k; int prec; int rnd; diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c index 6aca85ccb..433b077ec 100644 --- a/tests/tmul_ui.c +++ b/tests/tmul_ui.c @@ -86,7 +86,7 @@ main (int argc, char *argv[]) mpfr_t x, y; unsigned int xprec, yprec, i; mpfr_prec_t p; - mp_exp_t emax; + mpfr_exp_t emax; tests_start_mpfr (); diff --git a/tests/tpow.c b/tests/tpow.c index 982d741ac..787e99ab6 100644 --- a/tests/tpow.c +++ b/tests/tpow.c @@ -350,7 +350,7 @@ static void check_special_pow_si (void) { mpfr_t a, b; - mp_exp_t emin; + mpfr_exp_t emin; mpfr_init (a); mpfr_init (b); @@ -478,7 +478,7 @@ static void special (void) { mpfr_t x, y, z, t; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int inex; mpfr_init2 (x, 53); @@ -773,7 +773,7 @@ underflows (void) int err = 0; int inexact; int i; - mp_exp_t emin; + mpfr_exp_t emin; mpfr_init2 (x, 64); mpfr_init2 (y, 64); @@ -931,7 +931,7 @@ static void overflows2 (void) { mpfr_t x, y, z; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int e; /* x^y in reduced exponent range, where x = 2^b and y is not an integer @@ -981,7 +981,7 @@ overflows3 (void) if (MPFR_EMAX_MAX % 3 == 0) { mpfr_t x, y, z, t; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; unsigned int flags; int i; @@ -1085,7 +1085,7 @@ static void bug20071103 (void) { mpfr_t x, y, z; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -1111,7 +1111,7 @@ static void bug20071104 (void) { mpfr_t x, y, z; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int inex; emin = mpfr_get_emin (); @@ -1153,7 +1153,7 @@ bug20071127 (void) { mpfr_t x, y, z; int i, tern; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -1188,7 +1188,7 @@ bug20071128 (void) { mpfr_t max_val, x, y, z; int i, tern; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -1341,13 +1341,13 @@ bug20080721 (void) static void bug20080820 (void) { - mp_exp_t emin; + mpfr_exp_t emin; mpfr_t x, y, z1, z2; emin = mpfr_get_emin (); mpfr_set_emin (MPFR_EMIN_MIN); mpfr_init2 (x, 80); - mpfr_init2 (y, sizeof (mp_exp_t) * CHAR_BIT + 32); + mpfr_init2 (y, sizeof (mpfr_exp_t) * CHAR_BIT + 32); mpfr_init2 (z1, 2); mpfr_init2 (z2, 80); mpfr_set_ui (x, 2, MPFR_RNDN); diff --git a/tests/tpow_all.c b/tests/tpow_all.c index f12bc24f0..162f0d59a 100644 --- a/tests/tpow_all.c +++ b/tests/tpow_all.c @@ -466,7 +466,7 @@ static void underflow_up1 (void) { mpfr_t delta, x, y, z, z0; - mp_exp_t n; + mpfr_exp_t n; int inex; int rnd; int i; @@ -551,7 +551,7 @@ static void underflow_up2 (void) { mpfr_t x, y, z, z0, eps; - mp_exp_t n; + mpfr_exp_t n; int inex; int rnd; @@ -608,7 +608,7 @@ underflow_up3 (void) int i; mpfr_init2 (x, 64); - mpfr_init2 (y, sizeof (mp_exp_t) * CHAR_BIT); + mpfr_init2 (y, sizeof (mpfr_exp_t) * CHAR_BIT); mpfr_init2 (z, 32); mpfr_init2 (z0, 2); @@ -744,7 +744,7 @@ overflow_inv (void) static void alltst (void) { - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; ext = 0; tst (); diff --git a/tests/tpow_z.c b/tests/tpow_z.c index 6f6baf50b..4efb06ba3 100644 --- a/tests/tpow_z.c +++ b/tests/tpow_z.c @@ -323,7 +323,7 @@ bug20080904 (void) { mpz_t exp; mpfr_t a, answer; - mp_exp_t emin_default; + mpfr_exp_t emin_default; mpz_init (exp); mpfr_init2 (a, 70); diff --git a/tests/tprintf.c b/tests/tprintf.c index 39bf42620..1e542cbc8 100644 --- a/tests/tprintf.c +++ b/tests/tprintf.c @@ -349,7 +349,7 @@ check_random (int nb_tests) 'f', 'g' }; - mp_exp_t old_emin, old_emax; + mpfr_exp_t old_emin, old_emax; old_emin = mpfr_get_emin (); old_emax = mpfr_get_emax (); diff --git a/tests/trandom.c b/tests/trandom.c index 72df33d68..433b83c7a 100644 --- a/tests/trandom.c +++ b/tests/trandom.c @@ -32,7 +32,7 @@ test_urandomb (long nbtests, mpfr_prec_t prec, int verbose) mpfr_t x; int *tab, size_tab, k, sh, xn; double d, av = 0, var = 0, chi2 = 0, th; - mp_exp_t emin; + mpfr_exp_t emin; size_tab = (nbtests >= 1000 ? nbtests / 50 : 20); tab = (int *) calloc (size_tab, sizeof(int)); diff --git a/tests/trint.c b/tests/trint.c index 19b12f42b..f223bc83c 100644 --- a/tests/trint.c +++ b/tests/trint.c @@ -32,7 +32,7 @@ static void special (void) { mpfr_t x, y; - mp_exp_t emax; + mpfr_exp_t emax; mpfr_init (x); mpfr_init (y); diff --git a/tests/tround_prec.c b/tests/tround_prec.c index e809dc02b..ecc214748 100644 --- a/tests/tround_prec.c +++ b/tests/tround_prec.c @@ -29,7 +29,7 @@ int main (void) { mpfr_t x; - mp_exp_t emax; + mpfr_exp_t emax; tests_start_mpfr (); diff --git a/tests/tsec.c b/tests/tsec.c index 23d807e17..91bf22788 100644 --- a/tests/tsec.c +++ b/tests/tsec.c @@ -86,7 +86,7 @@ overflowed_sec0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); diff --git a/tests/tsech.c b/tests/tsech.c index 6f460f85e..d3b9d7b7b 100644 --- a/tests/tsech.c +++ b/tests/tsech.c @@ -103,7 +103,7 @@ overflowed_sech0 (void) { mpfr_t x, y; int emax, i, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); diff --git a/tests/tset.c b/tests/tset.c index 1b3060b04..154cd0e98 100644 --- a/tests/tset.c +++ b/tests/tset.c @@ -143,7 +143,7 @@ main (void) { mpfr_t x, y, z, u; int inexact; - mp_exp_t emax; + mpfr_exp_t emax; tests_start_mpfr (); diff --git a/tests/tset_exp.c b/tests/tset_exp.c index 09d5304ba..02239f051 100644 --- a/tests/tset_exp.c +++ b/tests/tset_exp.c @@ -30,7 +30,7 @@ main (int argc, char *argv[]) { mpfr_t x; int ret; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; tests_start_mpfr (); diff --git a/tests/tset_f.c b/tests/tset_f.c index 5988783ca..158eb61ee 100644 --- a/tests/tset_f.c +++ b/tests/tset_f.c @@ -31,7 +31,7 @@ main (void) { mpfr_t x, u; mpf_t y, z; - mp_exp_t emax; + mpfr_exp_t emax; unsigned long k, pr; int r, inexact; diff --git a/tests/tset_ld.c b/tests/tset_ld.c index 00ce34bfa..993061875 100644 --- a/tests/tset_ld.c +++ b/tests/tset_ld.c @@ -163,7 +163,7 @@ main (int argc, char *argv[]) long double d, e; mpfr_t x; int i; - mp_exp_t emax; + mpfr_exp_t emax; #ifdef WITH_FPU_CONTROL fpu_control_t cw; diff --git a/tests/tset_si.c b/tests/tset_si.c index 96510060a..5f0872e22 100644 --- a/tests/tset_si.c +++ b/tests/tset_si.c @@ -133,7 +133,7 @@ main (int argc, char *argv[]) unsigned long zl, dl; int inex; int r; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int flag; tests_start_mpfr (); diff --git a/tests/tset_str.c b/tests/tset_str.c index 6109f663c..940c57dc1 100644 --- a/tests/tset_str.c +++ b/tests/tset_str.c @@ -45,7 +45,7 @@ static void check_underflow (void) { mpfr_t a; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; int res; mpfr_init (a); @@ -102,7 +102,7 @@ main (int argc, char *argv[]) mpfr_t x, y; unsigned long k, bd, nc, i; char *str, *str2; - mp_exp_t e; + mpfr_exp_t e; int base, logbase, prec, baseprec, ret, obase; tests_start_mpfr (); @@ -771,7 +771,7 @@ main (int argc, char *argv[]) for (crnd = 0; crnd < 3; crnd++) { char *str1; - mp_exp_t exp; + mpfr_exp_t exp; *(MPFR_MANT(x)) = check_limb[climb]; MPFR_EXP(x) = 0; diff --git a/tests/tset_z.c b/tests/tset_z.c index 422f73c38..ff0ffaa3b 100644 --- a/tests/tset_z.c +++ b/tests/tset_z.c @@ -78,7 +78,7 @@ check_large (void) { mpz_t z; mpfr_t x, y; - mp_exp_t emax, emin; + mpfr_exp_t emax, emin; mpz_init (z); mpfr_init2 (x, 160); diff --git a/tests/tset_z_exp.c b/tests/tset_z_exp.c index 6126378d9..c2e35c58a 100644 --- a/tests/tset_z_exp.c +++ b/tests/tset_z_exp.c @@ -26,10 +26,10 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-test.h" -static mp_exp_t +static mpfr_exp_t randexp (void) { - return (mp_exp_t) (randlimb () % (__gmpfr_emax - __gmpfr_emin)) + return (mpfr_exp_t) (randlimb () % (__gmpfr_emax - __gmpfr_emin)) + __gmpfr_emin; } @@ -39,7 +39,7 @@ check0 (void) mpz_t y; mpfr_t x; int inexact, r; - mp_exp_t e; + mpfr_exp_t e; /* Check for +0 */ mpfr_init (x); @@ -69,7 +69,7 @@ check (long i, mpfr_rnd_t rnd) { mpfr_t f; mpz_t z; - mp_exp_t e; + mpfr_exp_t e; mpfr_init2 (f, 8 * sizeof(long)); mpz_init (z); diff --git a/tests/tsin_cos.c b/tests/tsin_cos.c index 2fc45b3c2..364a30506 100644 --- a/tests/tsin_cos.c +++ b/tests/tsin_cos.c @@ -170,7 +170,7 @@ overflowed_sin_cos0 (void) { mpfr_t x, y, z; int emax, inex, rnd, err = 0; - mp_exp_t old_emax; + mpfr_exp_t old_emax; old_emax = mpfr_get_emax (); @@ -560,7 +560,7 @@ static void consistency (void) { mpfr_t x, s1, s2, c1, c2; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; mpfr_rnd_t rnd; unsigned int flags_sin, flags_cos, flags, flags_before, flags_ref; int inex_sin, is, inex_cos, ic, inex, inex_ref; diff --git a/tests/tsprintf.c b/tests/tsprintf.c index 8bb488445..f627bdb46 100644 --- a/tests/tsprintf.c +++ b/tests/tsprintf.c @@ -1046,12 +1046,12 @@ bug20081214 (void) * some C libraries behave differently on %a, but this is a bug. */ static void -check_emax_aux (mp_exp_t e) +check_emax_aux (mpfr_exp_t e) { mpfr_t x; char *s1, s2[256]; int i; - mp_exp_t emax; + mpfr_exp_t emax; MPFR_ASSERTN (e <= LONG_MAX); emax = mpfr_get_emax (); diff --git a/tests/tsqr.c b/tests/tsqr.c index b8107b377..980ac6c15 100644 --- a/tests/tsqr.c +++ b/tests/tsqr.c @@ -85,7 +85,7 @@ static void check_special (void) { mpfr_t x, y; - mp_exp_t emin; + mpfr_exp_t emin; mpfr_init (x); mpfr_init (y); diff --git a/tests/tstrtofr.c b/tests/tstrtofr.c index 0620a3724..517871980 100644 --- a/tests/tstrtofr.c +++ b/tests/tstrtofr.c @@ -257,7 +257,7 @@ main (void) int i, base; mpfr_t x; mpfr_prec_t p; - mp_exp_t e; + mpfr_exp_t e; mpfr_init (x); printf ("struct dymmy_test { \n" diff --git a/tests/tsub1sp.c b/tests/tsub1sp.c index dbb6339d5..1219d8a41 100644 --- a/tests/tsub1sp.c +++ b/tests/tsub1sp.c @@ -102,7 +102,7 @@ check_special (void) int r; mpfr_prec_t p; int i = -1, inexact1, inexact2; - mp_exp_t es; + mpfr_exp_t es; mpfr_inits (x, y, z, x2, (mpfr_ptr) 0); diff --git a/tests/tsubnormal.c b/tests/tsubnormal.c index 10d6a2ed2..9085a4690 100644 --- a/tests/tsubnormal.c +++ b/tests/tsubnormal.c @@ -55,7 +55,7 @@ check1 (void) { mpfr_t x; int i, j, k, s, old_inex; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); @@ -109,7 +109,7 @@ check2 (void) { mpfr_t x, y, z; int tern; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); @@ -146,7 +146,7 @@ check3 (void) { mpfr_t x, y, z; int tern; - mp_exp_t emin; + mpfr_exp_t emin; emin = mpfr_get_emin (); diff --git a/tests/tsum.c b/tests/tsum.c index 51c5ce936..05ebb9176 100644 --- a/tests/tsum.c +++ b/tests/tsum.c @@ -58,7 +58,7 @@ static mpfr_prec_t get_prec_max (mpfr_t *tab, unsigned long n, mpfr_prec_t f) { mpfr_prec_t res; - mp_exp_t min, max; + mpfr_exp_t min, max; unsigned long i; for (i = 0; MPFR_IS_ZERO (tab[i]); i++) diff --git a/tests/ttanh.c b/tests/ttanh.c index e199950d8..7733152d3 100644 --- a/tests/ttanh.c +++ b/tests/ttanh.c @@ -62,7 +62,7 @@ special_overflow (void) { mpfr_t x, y; int i; - mp_exp_t emin, emax; + mpfr_exp_t emin, emax; emin = mpfr_get_emin (); emax = mpfr_get_emax (); diff --git a/tests/tui_pow.c b/tests/tui_pow.c index 7fc8f7f69..a0d68987b 100644 --- a/tests/tui_pow.c +++ b/tests/tui_pow.c @@ -89,7 +89,7 @@ check1 (mpfr_ptr x, mpfr_prec_t prec, unsigned long nt, mpfr_rnd_t rnd) mpfr_t y, z, t; int inexact, compare, compare2; mpfr_prec_t yprec; - mp_exp_t err; + mpfr_exp_t err; yprec = prec + 10; diff --git a/tests/turandom.c b/tests/turandom.c index 519bd886b..21f4e0b4f 100644 --- a/tests/turandom.c +++ b/tests/turandom.c @@ -32,7 +32,7 @@ test_urandom (long nbtests, mpfr_prec_t prec, mpfr_rnd_t rnd, long bit_index, mpfr_t x; int *tab, size_tab, k, sh, xn; double d, av = 0, var = 0, chi2 = 0, th; - mp_exp_t emin; + mpfr_exp_t emin; mp_size_t limb_index = 0; mp_limb_t limb_mask = 0; long count = 0; |