diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-06-25 12:50:21 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2014-06-25 12:50:21 +0000 |
commit | 3995ccc2ac359a2a66c567b0cc48b0ca987231e7 (patch) | |
tree | 3b27dc661eafea4e607eec2540e61f4ee32f9340 /src/mpfr-gmp.h | |
parent | 4fc658f4c030cdf8550bcf1a308df660ce617aae (diff) | |
download | mpfr-3995ccc2ac359a2a66c567b0cc48b0ca987231e7.tar.gz |
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
Diffstat (limited to 'src/mpfr-gmp.h')
-rw-r--r-- | src/mpfr-gmp.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 |