From 3995ccc2ac359a2a66c567b0cc48b0ca987231e7 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 25 Jun 2014 12:50:21 +0000 Subject: More code clean-up (for both consistency and readability): * Use the simple mp_limb_t constants when possible. * New internal macro MPFR_IS_NORMALIZED. Note: this was done with perl -pi -e ' s/~ *\(mp_limb_t\) *0/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *-1/MPFR_LIMB_MAX/g; s/\(mp_limb_t\) *0/MPFR_LIMB_ZERO/g; s/\(mp_limb_t\) *1L?/MPFR_LIMB_ONE/g' {src,tests}/*.{c,h} svn revert src/mpfr-impl.h and some manual changes. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9091 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/mpfr-gmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mpfr-gmp.h') diff --git a/src/mpfr-gmp.h b/src/mpfr-gmp.h index 90cad1ecf..c0bfd61bc 100644 --- a/src/mpfr-gmp.h +++ b/src/mpfr-gmp.h @@ -231,7 +231,7 @@ typedef unsigned int UHWtype; /* Use (4.0 * ...) instead of (2.0 * ...) to work around buggy compilers that don't convert ulong->double correctly (eg. SunOS 4 native cc). */ #undef MP_BASE_AS_DOUBLE -#define MP_BASE_AS_DOUBLE (4.0 * ((mp_limb_t) 1 << (GMP_NUMB_BITS - 2))) +#define MP_BASE_AS_DOUBLE (4.0 * (MPFR_LIMB_ONE << (GMP_NUMB_BITS - 2))) /* Structure for conversion between internal binary format and strings in base 2..36. */ @@ -332,7 +332,7 @@ __MPFR_DECLSPEC void mpfr_tmp_free _MPFR_PROTO ((struct tmp_marker *)); do { \ mp_limb_t dummy MPFR_MAYBE_UNUSED; \ MPFR_ASSERTD ((xl) != 0); \ - udiv_qrnnd (invxl, dummy, ~(xl), ~(mp_limb_t)0, xl); \ + udiv_qrnnd (invxl, dummy, ~(xl), MPFR_LIMB_MAX, xl); \ } while (0) #endif -- cgit v1.2.1