diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-01-20 11:59:39 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-01-20 11:59:39 +0000 |
commit | 306ac5f4d8c0f53dccd24f4aa6a0afa731fb4216 (patch) | |
tree | 0f069b97d4f8e86cbc00933b7a262fc44bf7b42f /src/invert_limb.h | |
parent | 7d9437abc8c288977a80b0e8fea93af37c576848 (diff) | |
download | mpfr-306ac5f4d8c0f53dccd24f4aa6a0afa731fb4216.tar.gz |
[src/invert_limb.h] Just like for invsqrt_limb.h (r11210), in 1UL << 60,
replaced 1UL by MPFR_LIMB_ONE to make the code valid with 32-bit long.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11211 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/invert_limb.h')
-rw-r--r-- | src/invert_limb.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/invert_limb.h b/src/invert_limb.h index 879140cc4..b65214fa5 100644 --- a/src/invert_limb.h +++ b/src/invert_limb.h @@ -116,7 +116,8 @@ static const mp_limb_t invert_limb_table2[256] = _v0 = invert_limb_table[_i]; \ _d40 = (_d >> 24) + 1; \ _v1 = _v0 - ((invert_limb_table2[_i] * _d40) >> 40) - 1; \ - _v2 = (_v1 << 13) + ((_v1 * ((1UL << 60) - _v1 * _d40)) >> 47); \ + _v2 = (_v1 << 13) + \ + ((_v1 * ((MPFR_LIMB_ONE << 60) - _v1 * _d40)) >> 47); \ _d0 = _d & 1; \ _d63 = ((_d - 1) >> 1) + 1; \ _e = - _v2 * _d63 + ((_v2 & -_d0) >> 1); \ @@ -139,7 +140,8 @@ static const mp_limb_t invert_limb_table2[256] = _v0 = invert_limb_table[_i]; \ _d40 = (_d >> 24) + 1; \ _v1 = _v0 - ((invert_limb_table2[_i] * _d40) >> 40) - 1; \ - _v2 = (_v1 << 13) + ((_v1 * ((1UL << 60) - _v1 * _d40)) >> 47); \ + _v2 = (_v1 << 13) + \ + ((_v1 * ((MPFR_LIMB_ONE << 60) - _v1 * _d40)) >> 47); \ _d0 = _d & 1; \ _d63 = ((_d - 1) >> 1) + 1; \ _e = - _v2 * _d63 + ((_v2 & -_d0) >> 1); \ |