diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-12-20 03:52:41 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2012-12-20 03:52:41 +0000 |
commit | 193a5b80b89d06b2d85a48a738ba0503ed49ac9e (patch) | |
tree | 5137651a73d4814ddafd640b3a702de659110887 | |
parent | d89dafd79868dc6f2a2df72ebfd85deb7178bf45 (diff) | |
download | mpfr-193a5b80b89d06b2d85a48a738ba0503ed49ac9e.tar.gz |
Compatibility with GMP 5.1.0 when gmp-impl.h is included (thanks to Rob:
https://sympa.inria.fr/sympa/arc/mpfr/2012-12/msg00003.html); clean-up.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@8439 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | src/get_f.c | 2 | ||||
-rw-r--r-- | src/mpfr-gmp.h | 1 | ||||
-rw-r--r-- | tests/tadd.c | 4 | ||||
-rw-r--r-- | tests/tgeneric.c | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/get_f.c b/src/get_f.c index 6fc376289..de3a3fcf7 100644 --- a/src/get_f.c +++ b/src/get_f.c @@ -61,7 +61,7 @@ mpfr_get_f (mpf_ptr x, mpfr_srcptr y, mpfr_rnd_t rnd_mode) sx = PREC (x); SIZ (x) = sx; - xp = LIMBS (x); + xp = PTR (x); for (i = 0; i < sx; i++) xp[i] = MP_LIMB_T_MAX; diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h index c4c6f1fc7..d8c8845a6 100644 --- a/src/mpfr-gmp.h +++ b/src/mpfr-gmp.h @@ -164,7 +164,6 @@ __MPFR_DECLSPEC void mpfr_assert_fail _MPFR_PROTO((const char *, int, #define SIZ(x) ((x)->_mp_size) #define ABSIZ(x) ABS (SIZ (x)) #define PTR(x) ((x)->_mp_d) -#define LIMBS(x) ((x)->_mp_d) #define EXP(x) ((x)->_mp_exp) #define PREC(x) ((x)->_mp_prec) #define ALLOC(x) ((x)->_mp_alloc) diff --git a/tests/tadd.c b/tests/tadd.c index 3df06f31f..492a65f1b 100644 --- a/tests/tadd.c +++ b/tests/tadd.c @@ -20,7 +20,7 @@ along with the GNU MPFR Library; see the file COPYING.LESSER. If not, see http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ -#define NUM 30000 +#define N 30000 #include <float.h> @@ -672,7 +672,7 @@ check_1111 (void) mpfr_init2 (one, MPFR_PREC_MIN); mpfr_set_ui (one, 1, MPFR_RNDN); - for (n = 0; n < NUM; n++) + for (n = 0; n < N; n++) { mpfr_prec_t prec_a, prec_b, prec_c; mpfr_exp_t tb=0, tc, diff; diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 107242860..a14f16570 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -121,7 +121,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #endif static void -test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) +test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax) { mpfr_prec_t prec, xprec, yprec; mpfr_t x, y, z, t, w; @@ -155,7 +155,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) mpfr_set_prec (w, yprec); /* Note: in precision p1, we test 4 special cases. */ - for (n = 0; n < (prec == p1 ? N + 4 : N); n++) + for (n = 0; n < (prec == p1 ? nmax + 4 : nmax); n++) { int infinite_input = 0; |