summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/get_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/get_str.c')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/get_str.c404
1 files changed, 219 insertions, 185 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/get_str.c b/Build/source/libs/mpfr/mpfr-src/src/get_str.c
index c71488dafd6..e1a8f0138f4 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/get_str.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/get_str.c
@@ -21,6 +21,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */
#define MPFR_NEED_LONGLONG_H
+#include "mpfr-intmax.h"
#include "mpfr-impl.h"
static int mpfr_get_str_aux (char *const, mpfr_exp_t *const, mp_limb_t *const,
@@ -47,15 +48,19 @@ static const char num_to_text62[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define MPFR_ROUND_FAILED 3
-/* Input: an approximation r*2^f of a real Y, with |r*2^f-Y| <= 2^(e+f).
- Returns if possible in the string s the mantissa corresponding to
- the integer nearest to Y, within the direction rnd, and returns the
- exponent in exp.
+/* Input: an approximation r*2^f to a real Y, with |r*2^f - Y| <= 2^(e+f).
+
+ If rounding is possible, returns:
+ - in s: a string representing the significand corresponding to
+ the integer nearest to Y, within the direction rnd;
+ - in exp: the exponent.
+
n is the number of limbs of r.
- e represents the maximal error in the approximation of Y
- (e < 0 iff the approximation is exact, i.e., r*2^f = Y).
- b is the wanted base (2 <= b <= 62).
- m is the number of wanted digits in the mantissa.
+ e represents the maximal error in the approximation to Y (see above),
+ (e < 0 means that the approximation is known to be exact, i.e.,
+ r*2^f = Y).
+ b is the wanted base (2 <= b <= 62 or -36 <= b <= -2).
+ m is the number of wanted digits in the significand.
rnd is the rounding mode.
It is assumed that b^(m-1) <= Y < b^(m+1), thus the returned value
satisfies b^(m-1) <= rnd(Y) < b^(m+1).
@@ -77,6 +82,7 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
mpfr_rnd_t rnd)
{
const char *num_to_text;
+ int b0 = b; /* initial base (might be negative) */
int dir; /* direction of the rounded result */
mp_limb_t ret = 0; /* possible carry in addition */
mp_size_t i0, j0; /* number of limbs and bits of Y */
@@ -95,7 +101,8 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
MPFR_TMP_MARK(marker);
- num_to_text = b < 37 ? num_to_text36 : num_to_text62;
+ num_to_text = (2 <= b0 && b0 <= 36) ? num_to_text36 : num_to_text62;
+ b = (b0 > 0) ? b0 : -b0;
/* R = 2^f sum r[i]K^(i)
r[i] = (r_(i,k-1)...r_(i,0))_2
@@ -103,7 +110,7 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
the bits from R are referenced by pairs (i,j) */
/* check if is possible to round r with rnd mode
- where |r*2^f-Y| <= 2^(e+f)
+ where |r*2^f - Y| <= 2^(e+f)
the exponent of R is: f + n*GMP_NUMB_BITS
we must have e + f == f + n*GMP_NUMB_BITS - err
err = n*GMP_NUMB_BITS - e
@@ -111,8 +118,8 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
to determine the nearest integer, we thus need a precision of
n * GMP_NUMB_BITS + f */
- if (exact || mpfr_can_round_raw (r, n, (mp_size_t) 1,
- n * GMP_NUMB_BITS - e, MPFR_RNDN, rnd, n * GMP_NUMB_BITS + f))
+ if (exact || mpfr_round_p (r, n, n * GMP_NUMB_BITS - e,
+ n * GMP_NUMB_BITS + f + (rnd == MPFR_RNDN)))
{
/* compute the nearest integer to R */
@@ -124,9 +131,6 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
n * GMP_NUMB_BITS + f, rnd, &dir);
MPFR_ASSERTD(dir != MPFR_ROUND_FAILED);
- /* warning: mpfr_round_raw_generic returns MPFR_EVEN_INEX (2) or
- -MPFR_EVEN_INEX (-2) in case of even rounding */
-
if (ret) /* Y is a power of 2 */
{
if (j0)
@@ -145,7 +149,7 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
/* now the rounded value Y is in {r+i0, n-i0} */
- /* convert r+i0 into base b */
+ /* convert r+i0 into base b: we use b0 which might be in -36..-2 */
str1 = (unsigned char*) MPFR_TMP_ALLOC (m + 3); /* need one extra character for mpn_get_str */
size_s1 = mpn_get_str (str1, b, r + i0, n - i0);
@@ -240,17 +244,21 @@ mpfr_get_str_aux (char *const str, mpfr_exp_t *const exp, mp_limb_t *const r,
/***************************************************************************
* __gmpfr_l2b[b-2][0] is a 23-bit upper approximation to log(b)/log(2), *
- * __gmpfr_l2b[b-2][1] is a 76-bit upper approximation to log(2)/log(b). *
+ * __gmpfr_l2b[b-2][1] is a 77-bit upper approximation to log(2)/log(b). *
* The following code is generated by tests/tl2b (with an argument). *
***************************************************************************/
+#ifndef UINT64_C
+# define UINT64_C(c) c
+#endif
+
#if 0
#elif GMP_NUMB_BITS == 16
const mp_limb_t mpfr_l2b_2_0__tab[] = { 0x0000, 0x8000 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_2_0__tab[] = { 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_2_0__tab[] = { 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_2_0__tab[] = { UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_2_0__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -265,7 +273,7 @@ const mp_limb_t mpfr_l2b_2_1__tab[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x8000 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_2_1__tab[] = { 0x00000000, 0x00000000, 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_2_1__tab[] = { 0x0000000000000000, 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_2_1__tab[] = { UINT64_C(0x0000000000000000), UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_2_1__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -280,7 +288,7 @@ const mp_limb_t mpfr_l2b_3_0__tab[] = { 0x0e00, 0xcae0 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_3_0__tab[] = { 0xcae00e00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_3_0__tab[] = { 0xcae00e0000000000 };
+const mp_limb_t mpfr_l2b_3_0__tab[] = { UINT64_C(0xcae00e0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_3_0__tab[] = { 0xcae00e000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -295,7 +303,7 @@ const mp_limb_t mpfr_l2b_3_1__tab[] = { 0x0448, 0xe94e, 0xa9a9, 0x9cc1, 0xa184 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_3_1__tab[] = { 0x04480000, 0xa9a9e94e, 0xa1849cc1 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_3_1__tab[] = { 0x0448000000000000, 0xa1849cc1a9a9e94e };
+const mp_limb_t mpfr_l2b_3_1__tab[] = { UINT64_C(0x0448000000000000), UINT64_C(0xa1849cc1a9a9e94e) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_3_1__tab[] = { 0xa1849cc1a9a9e94e04480000 };
#elif GMP_NUMB_BITS == 128
@@ -310,7 +318,7 @@ const mp_limb_t mpfr_l2b_4_0__tab[] = { 0x0000, 0x8000 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_4_0__tab[] = { 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_4_0__tab[] = { 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_4_0__tab[] = { UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_4_0__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -325,7 +333,7 @@ const mp_limb_t mpfr_l2b_4_1__tab[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x8000 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_4_1__tab[] = { 0x00000000, 0x00000000, 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_4_1__tab[] = { 0x0000000000000000, 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_4_1__tab[] = { UINT64_C(0x0000000000000000), UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_4_1__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -340,7 +348,7 @@ const mp_limb_t mpfr_l2b_5_0__tab[] = { 0x7a00, 0x949a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_5_0__tab[] = { 0x949a7a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_5_0__tab[] = { 0x949a7a0000000000 };
+const mp_limb_t mpfr_l2b_5_0__tab[] = { UINT64_C(0x949a7a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_5_0__tab[] = { 0x949a7a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -355,7 +363,7 @@ const mp_limb_t mpfr_l2b_5_1__tab[] = { 0x67b8, 0x9728, 0x287b, 0xa348, 0xdc81 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_5_1__tab[] = { 0x67b80000, 0x287b9728, 0xdc81a348 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_5_1__tab[] = { 0x67b8000000000000, 0xdc81a348287b9728 };
+const mp_limb_t mpfr_l2b_5_1__tab[] = { UINT64_C(0x67b8000000000000), UINT64_C(0xdc81a348287b9728) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_5_1__tab[] = { 0xdc81a348287b972867b80000 };
#elif GMP_NUMB_BITS == 128
@@ -370,7 +378,7 @@ const mp_limb_t mpfr_l2b_6_0__tab[] = { 0x0800, 0xa570 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_6_0__tab[] = { 0xa5700800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_6_0__tab[] = { 0xa570080000000000 };
+const mp_limb_t mpfr_l2b_6_0__tab[] = { UINT64_C(0xa570080000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_6_0__tab[] = { 0xa57008000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -385,7 +393,7 @@ const mp_limb_t mpfr_l2b_6_1__tab[] = { 0xff10, 0xf9e9, 0xe054, 0x9236, 0xc611 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_6_1__tab[] = { 0xff100000, 0xe054f9e9, 0xc6119236 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_6_1__tab[] = { 0xff10000000000000, 0xc6119236e054f9e9 };
+const mp_limb_t mpfr_l2b_6_1__tab[] = { UINT64_C(0xff10000000000000), UINT64_C(0xc6119236e054f9e9) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_6_1__tab[] = { 0xc6119236e054f9e9ff100000 };
#elif GMP_NUMB_BITS == 128
@@ -400,7 +408,7 @@ const mp_limb_t mpfr_l2b_7_0__tab[] = { 0xb400, 0xb3ab };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_7_0__tab[] = { 0xb3abb400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_7_0__tab[] = { 0xb3abb40000000000 };
+const mp_limb_t mpfr_l2b_7_0__tab[] = { UINT64_C(0xb3abb40000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_7_0__tab[] = { 0xb3abb4000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -415,7 +423,7 @@ const mp_limb_t mpfr_l2b_7_1__tab[] = { 0x37b8, 0xa711, 0x754d, 0xc9d6, 0xb660 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_7_1__tab[] = { 0x37b80000, 0x754da711, 0xb660c9d6 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_7_1__tab[] = { 0x37b8000000000000, 0xb660c9d6754da711 };
+const mp_limb_t mpfr_l2b_7_1__tab[] = { UINT64_C(0x37b8000000000000), UINT64_C(0xb660c9d6754da711) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_7_1__tab[] = { 0xb660c9d6754da71137b80000 };
#elif GMP_NUMB_BITS == 128
@@ -430,7 +438,7 @@ const mp_limb_t mpfr_l2b_8_0__tab[] = { 0x0000, 0xc000 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_8_0__tab[] = { 0xc0000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_8_0__tab[] = { 0xc000000000000000 };
+const mp_limb_t mpfr_l2b_8_0__tab[] = { UINT64_C(0xc000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_8_0__tab[] = { 0xc00000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -445,7 +453,7 @@ const mp_limb_t mpfr_l2b_8_1__tab[] = { 0xaab0, 0xaaaa, 0xaaaa, 0xaaaa, 0xaaaa }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_8_1__tab[] = { 0xaab00000, 0xaaaaaaaa, 0xaaaaaaaa };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_8_1__tab[] = { 0xaab0000000000000, 0xaaaaaaaaaaaaaaaa };
+const mp_limb_t mpfr_l2b_8_1__tab[] = { UINT64_C(0xaab0000000000000), UINT64_C(0xaaaaaaaaaaaaaaaa) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_8_1__tab[] = { 0xaaaaaaaaaaaaaaaaaab00000 };
#elif GMP_NUMB_BITS == 128
@@ -460,7 +468,7 @@ const mp_limb_t mpfr_l2b_9_0__tab[] = { 0x0e00, 0xcae0 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_9_0__tab[] = { 0xcae00e00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_9_0__tab[] = { 0xcae00e0000000000 };
+const mp_limb_t mpfr_l2b_9_0__tab[] = { UINT64_C(0xcae00e0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_9_0__tab[] = { 0xcae00e000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -475,7 +483,7 @@ const mp_limb_t mpfr_l2b_9_1__tab[] = { 0x0448, 0xe94e, 0xa9a9, 0x9cc1, 0xa184 }
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_9_1__tab[] = { 0x04480000, 0xa9a9e94e, 0xa1849cc1 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_9_1__tab[] = { 0x0448000000000000, 0xa1849cc1a9a9e94e };
+const mp_limb_t mpfr_l2b_9_1__tab[] = { UINT64_C(0x0448000000000000), UINT64_C(0xa1849cc1a9a9e94e) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_9_1__tab[] = { 0xa1849cc1a9a9e94e04480000 };
#elif GMP_NUMB_BITS == 128
@@ -490,7 +498,7 @@ const mp_limb_t mpfr_l2b_10_0__tab[] = { 0x7a00, 0xd49a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_10_0__tab[] = { 0xd49a7a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_10_0__tab[] = { 0xd49a7a0000000000 };
+const mp_limb_t mpfr_l2b_10_0__tab[] = { UINT64_C(0xd49a7a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_10_0__tab[] = { 0xd49a7a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -505,7 +513,7 @@ const mp_limb_t mpfr_l2b_10_1__tab[] = { 0x8f90, 0xf798, 0xfbcf, 0x9a84, 0x9a20
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_10_1__tab[] = { 0x8f900000, 0xfbcff798, 0x9a209a84 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_10_1__tab[] = { 0x8f90000000000000, 0x9a209a84fbcff798 };
+const mp_limb_t mpfr_l2b_10_1__tab[] = { UINT64_C(0x8f90000000000000), UINT64_C(0x9a209a84fbcff798) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_10_1__tab[] = { 0x9a209a84fbcff7988f900000 };
#elif GMP_NUMB_BITS == 128
@@ -520,7 +528,7 @@ const mp_limb_t mpfr_l2b_11_0__tab[] = { 0x5400, 0xdd67 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_11_0__tab[] = { 0xdd675400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_11_0__tab[] = { 0xdd67540000000000 };
+const mp_limb_t mpfr_l2b_11_0__tab[] = { UINT64_C(0xdd67540000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_11_0__tab[] = { 0xdd6754000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -535,7 +543,7 @@ const mp_limb_t mpfr_l2b_11_1__tab[] = { 0xe170, 0x9d10, 0xeb22, 0x4e0e, 0x9400
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_11_1__tab[] = { 0xe1700000, 0xeb229d10, 0x94004e0e };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_11_1__tab[] = { 0xe170000000000000, 0x94004e0eeb229d10 };
+const mp_limb_t mpfr_l2b_11_1__tab[] = { UINT64_C(0xe170000000000000), UINT64_C(0x94004e0eeb229d10) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_11_1__tab[] = { 0x94004e0eeb229d10e1700000 };
#elif GMP_NUMB_BITS == 128
@@ -550,7 +558,7 @@ const mp_limb_t mpfr_l2b_12_0__tab[] = { 0x0800, 0xe570 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_12_0__tab[] = { 0xe5700800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_12_0__tab[] = { 0xe570080000000000 };
+const mp_limb_t mpfr_l2b_12_0__tab[] = { UINT64_C(0xe570080000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_12_0__tab[] = { 0xe57008000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -565,7 +573,7 @@ const mp_limb_t mpfr_l2b_12_1__tab[] = { 0xfe28, 0x1c24, 0x0b03, 0x9c1a, 0x8ed1
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_12_1__tab[] = { 0xfe280000, 0x0b031c24, 0x8ed19c1a };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_12_1__tab[] = { 0xfe28000000000000, 0x8ed19c1a0b031c24 };
+const mp_limb_t mpfr_l2b_12_1__tab[] = { UINT64_C(0xfe28000000000000), UINT64_C(0x8ed19c1a0b031c24) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_12_1__tab[] = { 0x8ed19c1a0b031c24fe280000 };
#elif GMP_NUMB_BITS == 128
@@ -580,7 +588,7 @@ const mp_limb_t mpfr_l2b_13_0__tab[] = { 0x0200, 0xecd4 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_13_0__tab[] = { 0xecd40200 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_13_0__tab[] = { 0xecd4020000000000 };
+const mp_limb_t mpfr_l2b_13_0__tab[] = { UINT64_C(0xecd4020000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_13_0__tab[] = { 0xecd402000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -595,7 +603,7 @@ const mp_limb_t mpfr_l2b_13_1__tab[] = { 0x57f8, 0xf7b4, 0xcb20, 0xa7c6, 0x8a5c
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_13_1__tab[] = { 0x57f80000, 0xcb20f7b4, 0x8a5ca7c6 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_13_1__tab[] = { 0x57f8000000000000, 0x8a5ca7c6cb20f7b4 };
+const mp_limb_t mpfr_l2b_13_1__tab[] = { UINT64_C(0x57f8000000000000), UINT64_C(0x8a5ca7c6cb20f7b4) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_13_1__tab[] = { 0x8a5ca7c6cb20f7b457f80000 };
#elif GMP_NUMB_BITS == 128
@@ -610,7 +618,7 @@ const mp_limb_t mpfr_l2b_14_0__tab[] = { 0xb400, 0xf3ab };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_14_0__tab[] = { 0xf3abb400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_14_0__tab[] = { 0xf3abb40000000000 };
+const mp_limb_t mpfr_l2b_14_0__tab[] = { UINT64_C(0xf3abb40000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_14_0__tab[] = { 0xf3abb4000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -625,7 +633,7 @@ const mp_limb_t mpfr_l2b_14_1__tab[] = { 0x85a8, 0x5cab, 0x96b5, 0xfff6, 0x8679
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_14_1__tab[] = { 0x85a80000, 0x96b55cab, 0x8679fff6 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_14_1__tab[] = { 0x85a8000000000000, 0x8679fff696b55cab };
+const mp_limb_t mpfr_l2b_14_1__tab[] = { UINT64_C(0x85a8000000000000), UINT64_C(0x8679fff696b55cab) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_14_1__tab[] = { 0x8679fff696b55cab85a80000 };
#elif GMP_NUMB_BITS == 128
@@ -640,7 +648,7 @@ const mp_limb_t mpfr_l2b_15_0__tab[] = { 0x8000, 0xfa0a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_15_0__tab[] = { 0xfa0a8000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_15_0__tab[] = { 0xfa0a800000000000 };
+const mp_limb_t mpfr_l2b_15_0__tab[] = { UINT64_C(0xfa0a800000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_15_0__tab[] = { 0xfa0a80000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -655,7 +663,7 @@ const mp_limb_t mpfr_l2b_15_1__tab[] = { 0x6f80, 0xa6aa, 0x69f0, 0xee23, 0x830c
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_15_1__tab[] = { 0x6f800000, 0x69f0a6aa, 0x830cee23 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_15_1__tab[] = { 0x6f80000000000000, 0x830cee2369f0a6aa };
+const mp_limb_t mpfr_l2b_15_1__tab[] = { UINT64_C(0x6f80000000000000), UINT64_C(0x830cee2369f0a6aa) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_15_1__tab[] = { 0x830cee2369f0a6aa6f800000 };
#elif GMP_NUMB_BITS == 128
@@ -670,7 +678,7 @@ const mp_limb_t mpfr_l2b_16_0__tab[] = { 0x0000, 0x8000 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_16_0__tab[] = { 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_16_0__tab[] = { 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_16_0__tab[] = { UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_16_0__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -685,7 +693,7 @@ const mp_limb_t mpfr_l2b_16_1__tab[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x8000
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_16_1__tab[] = { 0x00000000, 0x00000000, 0x80000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_16_1__tab[] = { 0x0000000000000000, 0x8000000000000000 };
+const mp_limb_t mpfr_l2b_16_1__tab[] = { UINT64_C(0x0000000000000000), UINT64_C(0x8000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_16_1__tab[] = { 0x800000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -700,7 +708,7 @@ const mp_limb_t mpfr_l2b_17_0__tab[] = { 0x8000, 0x82cc };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_17_0__tab[] = { 0x82cc8000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_17_0__tab[] = { 0x82cc800000000000 };
+const mp_limb_t mpfr_l2b_17_0__tab[] = { UINT64_C(0x82cc800000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_17_0__tab[] = { 0x82cc80000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -715,7 +723,7 @@ const mp_limb_t mpfr_l2b_17_1__tab[] = { 0x8720, 0x259b, 0x62c4, 0xabf5, 0xfa85
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_17_1__tab[] = { 0x87200000, 0x62c4259b, 0xfa85abf5 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_17_1__tab[] = { 0x8720000000000000, 0xfa85abf562c4259b };
+const mp_limb_t mpfr_l2b_17_1__tab[] = { UINT64_C(0x8720000000000000), UINT64_C(0xfa85abf562c4259b) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_17_1__tab[] = { 0xfa85abf562c4259b87200000 };
#elif GMP_NUMB_BITS == 128
@@ -730,7 +738,7 @@ const mp_limb_t mpfr_l2b_18_0__tab[] = { 0x0800, 0x8570 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_18_0__tab[] = { 0x85700800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_18_0__tab[] = { 0x8570080000000000 };
+const mp_limb_t mpfr_l2b_18_0__tab[] = { UINT64_C(0x8570080000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_18_0__tab[] = { 0x857008000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -745,7 +753,7 @@ const mp_limb_t mpfr_l2b_18_1__tab[] = { 0x3698, 0x1378, 0x5537, 0x6634, 0xf591
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_18_1__tab[] = { 0x36980000, 0x55371378, 0xf5916634 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_18_1__tab[] = { 0x3698000000000000, 0xf591663455371378 };
+const mp_limb_t mpfr_l2b_18_1__tab[] = { UINT64_C(0x3698000000000000), UINT64_C(0xf591663455371378) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_18_1__tab[] = { 0xf59166345537137836980000 };
#elif GMP_NUMB_BITS == 128
@@ -760,7 +768,7 @@ const mp_limb_t mpfr_l2b_19_0__tab[] = { 0x0600, 0x87ef };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_19_0__tab[] = { 0x87ef0600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_19_0__tab[] = { 0x87ef060000000000 };
+const mp_limb_t mpfr_l2b_19_0__tab[] = { UINT64_C(0x87ef060000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_19_0__tab[] = { 0x87ef06000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -775,7 +783,7 @@ const mp_limb_t mpfr_l2b_19_1__tab[] = { 0x0db8, 0x558c, 0x62ed, 0x08c0, 0xf10f
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_19_1__tab[] = { 0x0db80000, 0x62ed558c, 0xf10f08c0 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_19_1__tab[] = { 0x0db8000000000000, 0xf10f08c062ed558c };
+const mp_limb_t mpfr_l2b_19_1__tab[] = { UINT64_C(0x0db8000000000000), UINT64_C(0xf10f08c062ed558c) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_19_1__tab[] = { 0xf10f08c062ed558c0db80000 };
#elif GMP_NUMB_BITS == 128
@@ -790,7 +798,7 @@ const mp_limb_t mpfr_l2b_20_0__tab[] = { 0x3e00, 0x8a4d };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_20_0__tab[] = { 0x8a4d3e00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_20_0__tab[] = { 0x8a4d3e0000000000 };
+const mp_limb_t mpfr_l2b_20_0__tab[] = { UINT64_C(0x8a4d3e0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_20_0__tab[] = { 0x8a4d3e000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -805,7 +813,7 @@ const mp_limb_t mpfr_l2b_20_1__tab[] = { 0x0b40, 0xa71c, 0x1cc1, 0x690a, 0xecee
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_20_1__tab[] = { 0x0b400000, 0x1cc1a71c, 0xecee690a };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_20_1__tab[] = { 0x0b40000000000000, 0xecee690a1cc1a71c };
+const mp_limb_t mpfr_l2b_20_1__tab[] = { UINT64_C(0x0b40000000000000), UINT64_C(0xecee690a1cc1a71c) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_20_1__tab[] = { 0xecee690a1cc1a71c0b400000 };
#elif GMP_NUMB_BITS == 128
@@ -820,7 +828,7 @@ const mp_limb_t mpfr_l2b_21_0__tab[] = { 0xde00, 0x8c8d };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_21_0__tab[] = { 0x8c8dde00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_21_0__tab[] = { 0x8c8dde0000000000 };
+const mp_limb_t mpfr_l2b_21_0__tab[] = { UINT64_C(0x8c8dde0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_21_0__tab[] = { 0x8c8dde000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -835,7 +843,7 @@ const mp_limb_t mpfr_l2b_21_1__tab[] = { 0x4108, 0x6b26, 0xb3d0, 0x63c1, 0xe922
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_21_1__tab[] = { 0x41080000, 0xb3d06b26, 0xe92263c1 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_21_1__tab[] = { 0x4108000000000000, 0xe92263c1b3d06b26 };
+const mp_limb_t mpfr_l2b_21_1__tab[] = { UINT64_C(0x4108000000000000), UINT64_C(0xe92263c1b3d06b26) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_21_1__tab[] = { 0xe92263c1b3d06b2641080000 };
#elif GMP_NUMB_BITS == 128
@@ -850,7 +858,7 @@ const mp_limb_t mpfr_l2b_22_0__tab[] = { 0xaa00, 0x8eb3 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_22_0__tab[] = { 0x8eb3aa00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_22_0__tab[] = { 0x8eb3aa0000000000 };
+const mp_limb_t mpfr_l2b_22_0__tab[] = { UINT64_C(0x8eb3aa0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_22_0__tab[] = { 0x8eb3aa000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -865,7 +873,7 @@ const mp_limb_t mpfr_l2b_22_1__tab[] = { 0xdbe8, 0xf061, 0x60b9, 0x2c4d, 0xe5a0
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_22_1__tab[] = { 0xdbe80000, 0x60b9f061, 0xe5a02c4d };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_22_1__tab[] = { 0xdbe8000000000000, 0xe5a02c4d60b9f061 };
+const mp_limb_t mpfr_l2b_22_1__tab[] = { UINT64_C(0xdbe8000000000000), UINT64_C(0xe5a02c4d60b9f061) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_22_1__tab[] = { 0xe5a02c4d60b9f061dbe80000 };
#elif GMP_NUMB_BITS == 128
@@ -880,7 +888,7 @@ const mp_limb_t mpfr_l2b_23_0__tab[] = { 0x0600, 0x90c1 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_23_0__tab[] = { 0x90c10600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_23_0__tab[] = { 0x90c1060000000000 };
+const mp_limb_t mpfr_l2b_23_0__tab[] = { UINT64_C(0x90c1060000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_23_0__tab[] = { 0x90c106000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -895,7 +903,7 @@ const mp_limb_t mpfr_l2b_23_1__tab[] = { 0xc3e0, 0x586a, 0x46b9, 0xcadd, 0xe25e
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_23_1__tab[] = { 0xc3e00000, 0x46b9586a, 0xe25ecadd };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_23_1__tab[] = { 0xc3e0000000000000, 0xe25ecadd46b9586a };
+const mp_limb_t mpfr_l2b_23_1__tab[] = { UINT64_C(0xc3e0000000000000), UINT64_C(0xe25ecadd46b9586a) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_23_1__tab[] = { 0xe25ecadd46b9586ac3e00000 };
#elif GMP_NUMB_BITS == 128
@@ -910,7 +918,7 @@ const mp_limb_t mpfr_l2b_24_0__tab[] = { 0x0400, 0x92b8 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_24_0__tab[] = { 0x92b80400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_24_0__tab[] = { 0x92b8040000000000 };
+const mp_limb_t mpfr_l2b_24_0__tab[] = { UINT64_C(0x92b8040000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_24_0__tab[] = { 0x92b804000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -925,7 +933,7 @@ const mp_limb_t mpfr_l2b_24_1__tab[] = { 0x3668, 0x7263, 0xc7c6, 0xbb44, 0xdf56
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_24_1__tab[] = { 0x36680000, 0xc7c67263, 0xdf56bb44 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_24_1__tab[] = { 0x3668000000000000, 0xdf56bb44c7c67263 };
+const mp_limb_t mpfr_l2b_24_1__tab[] = { UINT64_C(0x3668000000000000), UINT64_C(0xdf56bb44c7c67263) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_24_1__tab[] = { 0xdf56bb44c7c6726336680000 };
#elif GMP_NUMB_BITS == 128
@@ -940,7 +948,7 @@ const mp_limb_t mpfr_l2b_25_0__tab[] = { 0x7a00, 0x949a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_25_0__tab[] = { 0x949a7a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_25_0__tab[] = { 0x949a7a0000000000 };
+const mp_limb_t mpfr_l2b_25_0__tab[] = { UINT64_C(0x949a7a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_25_0__tab[] = { 0x949a7a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -955,7 +963,7 @@ const mp_limb_t mpfr_l2b_25_1__tab[] = { 0x67b8, 0x9728, 0x287b, 0xa348, 0xdc81
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_25_1__tab[] = { 0x67b80000, 0x287b9728, 0xdc81a348 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_25_1__tab[] = { 0x67b8000000000000, 0xdc81a348287b9728 };
+const mp_limb_t mpfr_l2b_25_1__tab[] = { UINT64_C(0x67b8000000000000), UINT64_C(0xdc81a348287b9728) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_25_1__tab[] = { 0xdc81a348287b972867b80000 };
#elif GMP_NUMB_BITS == 128
@@ -970,7 +978,7 @@ const mp_limb_t mpfr_l2b_26_0__tab[] = { 0x0200, 0x966a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_26_0__tab[] = { 0x966a0200 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_26_0__tab[] = { 0x966a020000000000 };
+const mp_limb_t mpfr_l2b_26_0__tab[] = { UINT64_C(0x966a020000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_26_0__tab[] = { 0x966a02000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -985,7 +993,7 @@ const mp_limb_t mpfr_l2b_26_1__tab[] = { 0x6458, 0x78a4, 0x7583, 0x19f9, 0xd9da
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_26_1__tab[] = { 0x64580000, 0x758378a4, 0xd9da19f9 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_26_1__tab[] = { 0x6458000000000000, 0xd9da19f9758378a4 };
+const mp_limb_t mpfr_l2b_26_1__tab[] = { UINT64_C(0x6458000000000000), UINT64_C(0xd9da19f9758378a4) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_26_1__tab[] = { 0xd9da19f9758378a464580000 };
#elif GMP_NUMB_BITS == 128
@@ -1000,7 +1008,7 @@ const mp_limb_t mpfr_l2b_27_0__tab[] = { 0x0a00, 0x9828 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_27_0__tab[] = { 0x98280a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_27_0__tab[] = { 0x98280a0000000000 };
+const mp_limb_t mpfr_l2b_27_0__tab[] = { UINT64_C(0x98280a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_27_0__tab[] = { 0x98280a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1015,7 +1023,7 @@ const mp_limb_t mpfr_l2b_27_1__tab[] = { 0x5b08, 0xe1bd, 0xe237, 0x7bac, 0xd75b
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_27_1__tab[] = { 0x5b080000, 0xe237e1bd, 0xd75b7bac };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_27_1__tab[] = { 0x5b08000000000000, 0xd75b7bace237e1bd };
+const mp_limb_t mpfr_l2b_27_1__tab[] = { UINT64_C(0x5b08000000000000), UINT64_C(0xd75b7bace237e1bd) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_27_1__tab[] = { 0xd75b7bace237e1bd5b080000 };
#elif GMP_NUMB_BITS == 128
@@ -1030,7 +1038,7 @@ const mp_limb_t mpfr_l2b_28_0__tab[] = { 0xda00, 0x99d5 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_28_0__tab[] = { 0x99d5da00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_28_0__tab[] = { 0x99d5da0000000000 };
+const mp_limb_t mpfr_l2b_28_0__tab[] = { UINT64_C(0x99d5da0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_28_0__tab[] = { 0x99d5da000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1045,7 +1053,7 @@ const mp_limb_t mpfr_l2b_28_1__tab[] = { 0xdeb8, 0xe8b8, 0x71df, 0xc758, 0xd501
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_28_1__tab[] = { 0xdeb80000, 0x71dfe8b8, 0xd501c758 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_28_1__tab[] = { 0xdeb8000000000000, 0xd501c75871dfe8b8 };
+const mp_limb_t mpfr_l2b_28_1__tab[] = { UINT64_C(0xdeb8000000000000), UINT64_C(0xd501c75871dfe8b8) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_28_1__tab[] = { 0xd501c75871dfe8b8deb80000 };
#elif GMP_NUMB_BITS == 128
@@ -1060,7 +1068,7 @@ const mp_limb_t mpfr_l2b_29_0__tab[] = { 0x9600, 0x9b74 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_29_0__tab[] = { 0x9b749600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_29_0__tab[] = { 0x9b74960000000000 };
+const mp_limb_t mpfr_l2b_29_0__tab[] = { UINT64_C(0x9b74960000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_29_0__tab[] = { 0x9b7496000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1075,7 +1083,7 @@ const mp_limb_t mpfr_l2b_29_1__tab[] = { 0xccc8, 0x62b3, 0x9c6c, 0x8315, 0xd2c9
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_29_1__tab[] = { 0xccc80000, 0x9c6c62b3, 0xd2c98315 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_29_1__tab[] = { 0xccc8000000000000, 0xd2c983159c6c62b3 };
+const mp_limb_t mpfr_l2b_29_1__tab[] = { UINT64_C(0xccc8000000000000), UINT64_C(0xd2c983159c6c62b3) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_29_1__tab[] = { 0xd2c983159c6c62b3ccc80000 };
#elif GMP_NUMB_BITS == 128
@@ -1090,7 +1098,7 @@ const mp_limb_t mpfr_l2b_30_0__tab[] = { 0x4000, 0x9d05 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_30_0__tab[] = { 0x9d054000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_30_0__tab[] = { 0x9d05400000000000 };
+const mp_limb_t mpfr_l2b_30_0__tab[] = { UINT64_C(0x9d05400000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_30_0__tab[] = { 0x9d0540000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1105,7 +1113,7 @@ const mp_limb_t mpfr_l2b_30_1__tab[] = { 0x3588, 0x1732, 0x5cad, 0xa619, 0xd0af
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_30_1__tab[] = { 0x35880000, 0x5cad1732, 0xd0afa619 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_30_1__tab[] = { 0x3588000000000000, 0xd0afa6195cad1732 };
+const mp_limb_t mpfr_l2b_30_1__tab[] = { UINT64_C(0x3588000000000000), UINT64_C(0xd0afa6195cad1732) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_30_1__tab[] = { 0xd0afa6195cad173235880000 };
#elif GMP_NUMB_BITS == 128
@@ -1120,7 +1128,7 @@ const mp_limb_t mpfr_l2b_31_0__tab[] = { 0xc800, 0x9e88 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_31_0__tab[] = { 0x9e88c800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_31_0__tab[] = { 0x9e88c80000000000 };
+const mp_limb_t mpfr_l2b_31_0__tab[] = { UINT64_C(0x9e88c80000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_31_0__tab[] = { 0x9e88c8000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1135,7 +1143,7 @@ const mp_limb_t mpfr_l2b_31_1__tab[] = { 0xd578, 0xf7ca, 0x63ee, 0x86e6, 0xceb1
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_31_1__tab[] = { 0xd5780000, 0x63eef7ca, 0xceb186e6 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_31_1__tab[] = { 0xd578000000000000, 0xceb186e663eef7ca };
+const mp_limb_t mpfr_l2b_31_1__tab[] = { UINT64_C(0xd578000000000000), UINT64_C(0xceb186e663eef7ca) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_31_1__tab[] = { 0xceb186e663eef7cad5780000 };
#elif GMP_NUMB_BITS == 128
@@ -1150,7 +1158,7 @@ const mp_limb_t mpfr_l2b_32_0__tab[] = { 0x0000, 0xa000 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_32_0__tab[] = { 0xa0000000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_32_0__tab[] = { 0xa000000000000000 };
+const mp_limb_t mpfr_l2b_32_0__tab[] = { UINT64_C(0xa000000000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_32_0__tab[] = { 0xa00000000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1165,7 +1173,7 @@ const mp_limb_t mpfr_l2b_32_1__tab[] = { 0xccd0, 0xcccc, 0xcccc, 0xcccc, 0xcccc
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_32_1__tab[] = { 0xccd00000, 0xcccccccc, 0xcccccccc };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_32_1__tab[] = { 0xccd0000000000000, 0xcccccccccccccccc };
+const mp_limb_t mpfr_l2b_32_1__tab[] = { UINT64_C(0xccd0000000000000), UINT64_C(0xcccccccccccccccc) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_32_1__tab[] = { 0xccccccccccccccccccd00000 };
#elif GMP_NUMB_BITS == 128
@@ -1180,7 +1188,7 @@ const mp_limb_t mpfr_l2b_33_0__tab[] = { 0xae00, 0xa16b };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_33_0__tab[] = { 0xa16bae00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_33_0__tab[] = { 0xa16bae0000000000 };
+const mp_limb_t mpfr_l2b_33_0__tab[] = { UINT64_C(0xa16bae0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_33_0__tab[] = { 0xa16bae000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1195,7 +1203,7 @@ const mp_limb_t mpfr_l2b_33_1__tab[] = { 0x0888, 0xa187, 0x5304, 0x6404, 0xcaff
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_33_1__tab[] = { 0x08880000, 0x5304a187, 0xcaff6404 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_33_1__tab[] = { 0x0888000000000000, 0xcaff64045304a187 };
+const mp_limb_t mpfr_l2b_33_1__tab[] = { UINT64_C(0x0888000000000000), UINT64_C(0xcaff64045304a187) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_33_1__tab[] = { 0xcaff64045304a18708880000 };
#elif GMP_NUMB_BITS == 128
@@ -1210,7 +1218,7 @@ const mp_limb_t mpfr_l2b_34_0__tab[] = { 0x8000, 0xa2cc };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_34_0__tab[] = { 0xa2cc8000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_34_0__tab[] = { 0xa2cc800000000000 };
+const mp_limb_t mpfr_l2b_34_0__tab[] = { UINT64_C(0xa2cc800000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_34_0__tab[] = { 0xa2cc80000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1225,7 +1233,7 @@ const mp_limb_t mpfr_l2b_34_1__tab[] = { 0xfb50, 0x17ca, 0x5a79, 0x73d8, 0xc947
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_34_1__tab[] = { 0xfb500000, 0x5a7917ca, 0xc94773d8 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_34_1__tab[] = { 0xfb50000000000000, 0xc94773d85a7917ca };
+const mp_limb_t mpfr_l2b_34_1__tab[] = { UINT64_C(0xfb50000000000000), UINT64_C(0xc94773d85a7917ca) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_34_1__tab[] = { 0xc94773d85a7917cafb500000 };
#elif GMP_NUMB_BITS == 128
@@ -1240,7 +1248,7 @@ const mp_limb_t mpfr_l2b_35_0__tab[] = { 0x1800, 0xa423 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_35_0__tab[] = { 0xa4231800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_35_0__tab[] = { 0xa423180000000000 };
+const mp_limb_t mpfr_l2b_35_0__tab[] = { UINT64_C(0xa423180000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_35_0__tab[] = { 0xa42318000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1255,7 +1263,7 @@ const mp_limb_t mpfr_l2b_35_1__tab[] = { 0x6960, 0x18c2, 0x6037, 0x567c, 0xc7a3
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_35_1__tab[] = { 0x69600000, 0x603718c2, 0xc7a3567c };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_35_1__tab[] = { 0x6960000000000000, 0xc7a3567c603718c2 };
+const mp_limb_t mpfr_l2b_35_1__tab[] = { UINT64_C(0x6960000000000000), UINT64_C(0xc7a3567c603718c2) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_35_1__tab[] = { 0xc7a3567c603718c269600000 };
#elif GMP_NUMB_BITS == 128
@@ -1270,7 +1278,7 @@ const mp_limb_t mpfr_l2b_36_0__tab[] = { 0x0800, 0xa570 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_36_0__tab[] = { 0xa5700800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_36_0__tab[] = { 0xa570080000000000 };
+const mp_limb_t mpfr_l2b_36_0__tab[] = { UINT64_C(0xa570080000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_36_0__tab[] = { 0xa57008000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1285,7 +1293,7 @@ const mp_limb_t mpfr_l2b_36_1__tab[] = { 0xff10, 0xf9e9, 0xe054, 0x9236, 0xc611
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_36_1__tab[] = { 0xff100000, 0xe054f9e9, 0xc6119236 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_36_1__tab[] = { 0xff10000000000000, 0xc6119236e054f9e9 };
+const mp_limb_t mpfr_l2b_36_1__tab[] = { UINT64_C(0xff10000000000000), UINT64_C(0xc6119236e054f9e9) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_36_1__tab[] = { 0xc6119236e054f9e9ff100000 };
#elif GMP_NUMB_BITS == 128
@@ -1300,7 +1308,7 @@ const mp_limb_t mpfr_l2b_37_0__tab[] = { 0xd800, 0xa6b3 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_37_0__tab[] = { 0xa6b3d800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_37_0__tab[] = { 0xa6b3d80000000000 };
+const mp_limb_t mpfr_l2b_37_0__tab[] = { UINT64_C(0xa6b3d80000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_37_0__tab[] = { 0xa6b3d8000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1315,7 +1323,7 @@ const mp_limb_t mpfr_l2b_37_1__tab[] = { 0x1618, 0x6b36, 0x70d7, 0xd3a2, 0xc490
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_37_1__tab[] = { 0x16180000, 0x70d76b36, 0xc490d3a2 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_37_1__tab[] = { 0x1618000000000000, 0xc490d3a270d76b36 };
+const mp_limb_t mpfr_l2b_37_1__tab[] = { UINT64_C(0x1618000000000000), UINT64_C(0xc490d3a270d76b36) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_37_1__tab[] = { 0xc490d3a270d76b3616180000 };
#elif GMP_NUMB_BITS == 128
@@ -1330,7 +1338,7 @@ const mp_limb_t mpfr_l2b_38_0__tab[] = { 0x0600, 0xa7ef };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_38_0__tab[] = { 0xa7ef0600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_38_0__tab[] = { 0xa7ef060000000000 };
+const mp_limb_t mpfr_l2b_38_0__tab[] = { UINT64_C(0xa7ef060000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_38_0__tab[] = { 0xa7ef06000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1345,7 +1353,7 @@ const mp_limb_t mpfr_l2b_38_1__tab[] = { 0xa3e0, 0x9505, 0x5182, 0xe8d2, 0xc31f
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_38_1__tab[] = { 0xa3e00000, 0x51829505, 0xc31fe8d2 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_38_1__tab[] = { 0xa3e0000000000000, 0xc31fe8d251829505 };
+const mp_limb_t mpfr_l2b_38_1__tab[] = { UINT64_C(0xa3e0000000000000), UINT64_C(0xc31fe8d251829505) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_38_1__tab[] = { 0xc31fe8d251829505a3e00000 };
#elif GMP_NUMB_BITS == 128
@@ -1360,7 +1368,7 @@ const mp_limb_t mpfr_l2b_39_0__tab[] = { 0x0400, 0xa922 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_39_0__tab[] = { 0xa9220400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_39_0__tab[] = { 0xa922040000000000 };
+const mp_limb_t mpfr_l2b_39_0__tab[] = { UINT64_C(0xa922040000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_39_0__tab[] = { 0xa92204000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1375,7 +1383,7 @@ const mp_limb_t mpfr_l2b_39_1__tab[] = { 0xfcf8, 0xf1b5, 0x10ca, 0xbd32, 0xc1bd
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_39_1__tab[] = { 0xfcf80000, 0x10caf1b5, 0xc1bdbd32 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_39_1__tab[] = { 0xfcf8000000000000, 0xc1bdbd3210caf1b5 };
+const mp_limb_t mpfr_l2b_39_1__tab[] = { UINT64_C(0xfcf8000000000000), UINT64_C(0xc1bdbd3210caf1b5) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_39_1__tab[] = { 0xc1bdbd3210caf1b5fcf80000 };
#elif GMP_NUMB_BITS == 128
@@ -1390,7 +1398,7 @@ const mp_limb_t mpfr_l2b_40_0__tab[] = { 0x3e00, 0xaa4d };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_40_0__tab[] = { 0xaa4d3e00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_40_0__tab[] = { 0xaa4d3e0000000000 };
+const mp_limb_t mpfr_l2b_40_0__tab[] = { UINT64_C(0xaa4d3e0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_40_0__tab[] = { 0xaa4d3e000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1405,7 +1413,7 @@ const mp_limb_t mpfr_l2b_40_1__tab[] = { 0xdce8, 0x4948, 0xeff7, 0x55ff, 0xc069
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_40_1__tab[] = { 0xdce80000, 0xeff74948, 0xc06955ff };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_40_1__tab[] = { 0xdce8000000000000, 0xc06955ffeff74948 };
+const mp_limb_t mpfr_l2b_40_1__tab[] = { UINT64_C(0xdce8000000000000), UINT64_C(0xc06955ffeff74948) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_40_1__tab[] = { 0xc06955ffeff74948dce80000 };
#elif GMP_NUMB_BITS == 128
@@ -1420,7 +1428,7 @@ const mp_limb_t mpfr_l2b_41_0__tab[] = { 0x1200, 0xab71 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_41_0__tab[] = { 0xab711200 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_41_0__tab[] = { 0xab71120000000000 };
+const mp_limb_t mpfr_l2b_41_0__tab[] = { UINT64_C(0xab71120000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_41_0__tab[] = { 0xab7112000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1435,7 +1443,7 @@ const mp_limb_t mpfr_l2b_41_1__tab[] = { 0xdc28, 0x7cef, 0xf695, 0xcf47, 0xbf21
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_41_1__tab[] = { 0xdc280000, 0xf6957cef, 0xbf21cf47 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_41_1__tab[] = { 0xdc28000000000000, 0xbf21cf47f6957cef };
+const mp_limb_t mpfr_l2b_41_1__tab[] = { UINT64_C(0xdc28000000000000), UINT64_C(0xbf21cf47f6957cef) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_41_1__tab[] = { 0xbf21cf47f6957cefdc280000 };
#elif GMP_NUMB_BITS == 128
@@ -1450,7 +1458,7 @@ const mp_limb_t mpfr_l2b_42_0__tab[] = { 0xde00, 0xac8d };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_42_0__tab[] = { 0xac8dde00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_42_0__tab[] = { 0xac8dde0000000000 };
+const mp_limb_t mpfr_l2b_42_0__tab[] = { UINT64_C(0xac8dde0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_42_0__tab[] = { 0xac8dde000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1465,7 +1473,7 @@ const mp_limb_t mpfr_l2b_42_1__tab[] = { 0xba10, 0x7125, 0x939b, 0x594a, 0xbde6
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_42_1__tab[] = { 0xba100000, 0x939b7125, 0xbde6594a };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_42_1__tab[] = { 0xba10000000000000, 0xbde6594a939b7125 };
+const mp_limb_t mpfr_l2b_42_1__tab[] = { UINT64_C(0xba10000000000000), UINT64_C(0xbde6594a939b7125) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_42_1__tab[] = { 0xbde6594a939b7125ba100000 };
#elif GMP_NUMB_BITS == 128
@@ -1480,7 +1488,7 @@ const mp_limb_t mpfr_l2b_43_0__tab[] = { 0xf600, 0xada3 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_43_0__tab[] = { 0xada3f600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_43_0__tab[] = { 0xada3f60000000000 };
+const mp_limb_t mpfr_l2b_43_0__tab[] = { UINT64_C(0xada3f60000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_43_0__tab[] = { 0xada3f6000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1495,7 +1503,7 @@ const mp_limb_t mpfr_l2b_43_1__tab[] = { 0x9560, 0x2ab5, 0x9118, 0x363d, 0xbcb6
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_43_1__tab[] = { 0x95600000, 0x91182ab5, 0xbcb6363d };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_43_1__tab[] = { 0x9560000000000000, 0xbcb6363d91182ab5 };
+const mp_limb_t mpfr_l2b_43_1__tab[] = { UINT64_C(0x9560000000000000), UINT64_C(0xbcb6363d91182ab5) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_43_1__tab[] = { 0xbcb6363d91182ab595600000 };
#elif GMP_NUMB_BITS == 128
@@ -1510,7 +1518,7 @@ const mp_limb_t mpfr_l2b_44_0__tab[] = { 0xaa00, 0xaeb3 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_44_0__tab[] = { 0xaeb3aa00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_44_0__tab[] = { 0xaeb3aa0000000000 };
+const mp_limb_t mpfr_l2b_44_0__tab[] = { UINT64_C(0xaeb3aa0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_44_0__tab[] = { 0xaeb3aa000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1525,7 +1533,7 @@ const mp_limb_t mpfr_l2b_44_1__tab[] = { 0x1590, 0x4e90, 0x3a3d, 0xb859, 0xbb90
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_44_1__tab[] = { 0x15900000, 0x3a3d4e90, 0xbb90b859 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_44_1__tab[] = { 0x1590000000000000, 0xbb90b8593a3d4e90 };
+const mp_limb_t mpfr_l2b_44_1__tab[] = { UINT64_C(0x1590000000000000), UINT64_C(0xbb90b8593a3d4e90) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_44_1__tab[] = { 0xbb90b8593a3d4e9015900000 };
#elif GMP_NUMB_BITS == 128
@@ -1540,7 +1548,7 @@ const mp_limb_t mpfr_l2b_45_0__tab[] = { 0x4400, 0xafbd };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_45_0__tab[] = { 0xafbd4400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_45_0__tab[] = { 0xafbd440000000000 };
+const mp_limb_t mpfr_l2b_45_0__tab[] = { UINT64_C(0xafbd440000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_45_0__tab[] = { 0xafbd44000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1555,7 +1563,7 @@ const mp_limb_t mpfr_l2b_45_1__tab[] = { 0x1e78, 0x76f5, 0x1010, 0x4026, 0xba75
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_45_1__tab[] = { 0x1e780000, 0x101076f5, 0xba754026 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_45_1__tab[] = { 0x1e78000000000000, 0xba754026101076f5 };
+const mp_limb_t mpfr_l2b_45_1__tab[] = { UINT64_C(0x1e78000000000000), UINT64_C(0xba754026101076f5) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_45_1__tab[] = { 0xba754026101076f51e780000 };
#elif GMP_NUMB_BITS == 128
@@ -1570,7 +1578,7 @@ const mp_limb_t mpfr_l2b_46_0__tab[] = { 0x0600, 0xb0c1 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_46_0__tab[] = { 0xb0c10600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_46_0__tab[] = { 0xb0c1060000000000 };
+const mp_limb_t mpfr_l2b_46_0__tab[] = { UINT64_C(0xb0c1060000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_46_0__tab[] = { 0xb0c106000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1585,7 +1593,7 @@ const mp_limb_t mpfr_l2b_46_1__tab[] = { 0xb670, 0x0512, 0x69aa, 0x3b01, 0xb963
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_46_1__tab[] = { 0xb6700000, 0x69aa0512, 0xb9633b01 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_46_1__tab[] = { 0xb670000000000000, 0xb9633b0169aa0512 };
+const mp_limb_t mpfr_l2b_46_1__tab[] = { UINT64_C(0xb670000000000000), UINT64_C(0xb9633b0169aa0512) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_46_1__tab[] = { 0xb9633b0169aa0512b6700000 };
#elif GMP_NUMB_BITS == 128
@@ -1600,7 +1608,7 @@ const mp_limb_t mpfr_l2b_47_0__tab[] = { 0x3200, 0xb1bf };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_47_0__tab[] = { 0xb1bf3200 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_47_0__tab[] = { 0xb1bf320000000000 };
+const mp_limb_t mpfr_l2b_47_0__tab[] = { UINT64_C(0xb1bf320000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_47_0__tab[] = { 0xb1bf32000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1615,7 +1623,7 @@ const mp_limb_t mpfr_l2b_47_1__tab[] = { 0x5118, 0x4133, 0xfbe4, 0x21d0, 0xb85a
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_47_1__tab[] = { 0x51180000, 0xfbe44133, 0xb85a21d0 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_47_1__tab[] = { 0x5118000000000000, 0xb85a21d0fbe44133 };
+const mp_limb_t mpfr_l2b_47_1__tab[] = { UINT64_C(0x5118000000000000), UINT64_C(0xb85a21d0fbe44133) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_47_1__tab[] = { 0xb85a21d0fbe4413351180000 };
#elif GMP_NUMB_BITS == 128
@@ -1630,7 +1638,7 @@ const mp_limb_t mpfr_l2b_48_0__tab[] = { 0x0400, 0xb2b8 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_48_0__tab[] = { 0xb2b80400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_48_0__tab[] = { 0xb2b8040000000000 };
+const mp_limb_t mpfr_l2b_48_0__tab[] = { UINT64_C(0xb2b8040000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_48_0__tab[] = { 0xb2b804000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1645,7 +1653,7 @@ const mp_limb_t mpfr_l2b_48_1__tab[] = { 0x0490, 0x663d, 0x960d, 0x77de, 0xb759
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_48_1__tab[] = { 0x04900000, 0x960d663d, 0xb75977de };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_48_1__tab[] = { 0x0490000000000000, 0xb75977de960d663d };
+const mp_limb_t mpfr_l2b_48_1__tab[] = { UINT64_C(0x0490000000000000), UINT64_C(0xb75977de960d663d) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_48_1__tab[] = { 0xb75977de960d663d04900000 };
#elif GMP_NUMB_BITS == 128
@@ -1660,7 +1668,7 @@ const mp_limb_t mpfr_l2b_49_0__tab[] = { 0xb400, 0xb3ab };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_49_0__tab[] = { 0xb3abb400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_49_0__tab[] = { 0xb3abb40000000000 };
+const mp_limb_t mpfr_l2b_49_0__tab[] = { UINT64_C(0xb3abb40000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_49_0__tab[] = { 0xb3abb4000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1675,7 +1683,7 @@ const mp_limb_t mpfr_l2b_49_1__tab[] = { 0x37b8, 0xa711, 0x754d, 0xc9d6, 0xb660
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_49_1__tab[] = { 0x37b80000, 0x754da711, 0xb660c9d6 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_49_1__tab[] = { 0x37b8000000000000, 0xb660c9d6754da711 };
+const mp_limb_t mpfr_l2b_49_1__tab[] = { UINT64_C(0x37b8000000000000), UINT64_C(0xb660c9d6754da711) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_49_1__tab[] = { 0xb660c9d6754da71137b80000 };
#elif GMP_NUMB_BITS == 128
@@ -1690,7 +1698,7 @@ const mp_limb_t mpfr_l2b_50_0__tab[] = { 0x7a00, 0xb49a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_50_0__tab[] = { 0xb49a7a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_50_0__tab[] = { 0xb49a7a0000000000 };
+const mp_limb_t mpfr_l2b_50_0__tab[] = { UINT64_C(0xb49a7a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_50_0__tab[] = { 0xb49a7a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1705,7 +1713,7 @@ const mp_limb_t mpfr_l2b_50_1__tab[] = { 0x27f0, 0xe532, 0x7344, 0xace3, 0xb56f
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_50_1__tab[] = { 0x27f00000, 0x7344e532, 0xb56face3 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_50_1__tab[] = { 0x27f0000000000000, 0xb56face37344e532 };
+const mp_limb_t mpfr_l2b_50_1__tab[] = { UINT64_C(0x27f0000000000000), UINT64_C(0xb56face37344e532) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_50_1__tab[] = { 0xb56face37344e53227f00000 };
#elif GMP_NUMB_BITS == 128
@@ -1720,7 +1728,7 @@ const mp_limb_t mpfr_l2b_51_0__tab[] = { 0x8400, 0xb584 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_51_0__tab[] = { 0xb5848400 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_51_0__tab[] = { 0xb584840000000000 };
+const mp_limb_t mpfr_l2b_51_0__tab[] = { UINT64_C(0xb584840000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_51_0__tab[] = { 0xb58484000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1735,7 +1743,7 @@ const mp_limb_t mpfr_l2b_51_1__tab[] = { 0x4000, 0xe9a9, 0x0f8a, 0xbde5, 0xb485
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_51_1__tab[] = { 0x40000000, 0x0f8ae9a9, 0xb485bde5 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_51_1__tab[] = { 0x4000000000000000, 0xb485bde50f8ae9a9 };
+const mp_limb_t mpfr_l2b_51_1__tab[] = { UINT64_C(0x4000000000000000), UINT64_C(0xb485bde50f8ae9a9) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_51_1__tab[] = { 0xb485bde50f8ae9a940000000 };
#elif GMP_NUMB_BITS == 128
@@ -1750,7 +1758,7 @@ const mp_limb_t mpfr_l2b_52_0__tab[] = { 0x0200, 0xb66a };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_52_0__tab[] = { 0xb66a0200 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_52_0__tab[] = { 0xb66a020000000000 };
+const mp_limb_t mpfr_l2b_52_0__tab[] = { UINT64_C(0xb66a020000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_52_0__tab[] = { 0xb66a02000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1765,7 +1773,7 @@ const mp_limb_t mpfr_l2b_52_1__tab[] = { 0x4608, 0xfcb3, 0xeecf, 0xa0bb, 0xb3a2
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_52_1__tab[] = { 0x46080000, 0xeecffcb3, 0xb3a2a0bb };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_52_1__tab[] = { 0x4608000000000000, 0xb3a2a0bbeecffcb3 };
+const mp_limb_t mpfr_l2b_52_1__tab[] = { UINT64_C(0x4608000000000000), UINT64_C(0xb3a2a0bbeecffcb3) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_52_1__tab[] = { 0xb3a2a0bbeecffcb346080000 };
#elif GMP_NUMB_BITS == 128
@@ -1780,7 +1788,7 @@ const mp_limb_t mpfr_l2b_53_0__tab[] = { 0x2000, 0xb74b };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_53_0__tab[] = { 0xb74b2000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_53_0__tab[] = { 0xb74b200000000000 };
+const mp_limb_t mpfr_l2b_53_0__tab[] = { UINT64_C(0xb74b200000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_53_0__tab[] = { 0xb74b20000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1795,7 +1803,7 @@ const mp_limb_t mpfr_l2b_53_1__tab[] = { 0xa360, 0x8ccb, 0xeb5f, 0xffa9, 0xb2c5
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_53_1__tab[] = { 0xa3600000, 0xeb5f8ccb, 0xb2c5ffa9 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_53_1__tab[] = { 0xa360000000000000, 0xb2c5ffa9eb5f8ccb };
+const mp_limb_t mpfr_l2b_53_1__tab[] = { UINT64_C(0xa360000000000000), UINT64_C(0xb2c5ffa9eb5f8ccb) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_53_1__tab[] = { 0xb2c5ffa9eb5f8ccba3600000 };
#elif GMP_NUMB_BITS == 128
@@ -1810,7 +1818,7 @@ const mp_limb_t mpfr_l2b_54_0__tab[] = { 0x0a00, 0xb828 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_54_0__tab[] = { 0xb8280a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_54_0__tab[] = { 0xb8280a0000000000 };
+const mp_limb_t mpfr_l2b_54_0__tab[] = { UINT64_C(0xb8280a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_54_0__tab[] = { 0xb8280a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1825,7 +1833,7 @@ const mp_limb_t mpfr_l2b_54_1__tab[] = { 0xf368, 0xe940, 0x3e86, 0x8ac3, 0xb1ef
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_54_1__tab[] = { 0xf3680000, 0x3e86e940, 0xb1ef8ac3 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_54_1__tab[] = { 0xf368000000000000, 0xb1ef8ac33e86e940 };
+const mp_limb_t mpfr_l2b_54_1__tab[] = { UINT64_C(0xf368000000000000), UINT64_C(0xb1ef8ac33e86e940) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_54_1__tab[] = { 0xb1ef8ac33e86e940f3680000 };
#elif GMP_NUMB_BITS == 128
@@ -1840,7 +1848,7 @@ const mp_limb_t mpfr_l2b_55_0__tab[] = { 0xe800, 0xb900 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_55_0__tab[] = { 0xb900e800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_55_0__tab[] = { 0xb900e80000000000 };
+const mp_limb_t mpfr_l2b_55_0__tab[] = { UINT64_C(0xb900e80000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_55_0__tab[] = { 0xb900e8000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1855,7 +1863,7 @@ const mp_limb_t mpfr_l2b_55_1__tab[] = { 0x7a40, 0xd18e, 0xa4b5, 0xf76e, 0xb11e
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_55_1__tab[] = { 0x7a400000, 0xa4b5d18e, 0xb11ef76e };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_55_1__tab[] = { 0x7a40000000000000, 0xb11ef76ea4b5d18e };
+const mp_limb_t mpfr_l2b_55_1__tab[] = { UINT64_C(0x7a40000000000000), UINT64_C(0xb11ef76ea4b5d18e) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_55_1__tab[] = { 0xb11ef76ea4b5d18e7a400000 };
#elif GMP_NUMB_BITS == 128
@@ -1870,7 +1878,7 @@ const mp_limb_t mpfr_l2b_56_0__tab[] = { 0xda00, 0xb9d5 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_56_0__tab[] = { 0xb9d5da00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_56_0__tab[] = { 0xb9d5da0000000000 };
+const mp_limb_t mpfr_l2b_56_0__tab[] = { UINT64_C(0xb9d5da0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_56_0__tab[] = { 0xb9d5da000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1885,7 +1893,7 @@ const mp_limb_t mpfr_l2b_56_1__tab[] = { 0xe818, 0x4c7b, 0xaa2c, 0xfff2, 0xb053
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_56_1__tab[] = { 0xe8180000, 0xaa2c4c7b, 0xb053fff2 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_56_1__tab[] = { 0xe818000000000000, 0xb053fff2aa2c4c7b };
+const mp_limb_t mpfr_l2b_56_1__tab[] = { UINT64_C(0xe818000000000000), UINT64_C(0xb053fff2aa2c4c7b) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_56_1__tab[] = { 0xb053fff2aa2c4c7be8180000 };
#elif GMP_NUMB_BITS == 128
@@ -1900,7 +1908,7 @@ const mp_limb_t mpfr_l2b_57_0__tab[] = { 0x0a00, 0xbaa7 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_57_0__tab[] = { 0xbaa70a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_57_0__tab[] = { 0xbaa70a0000000000 };
+const mp_limb_t mpfr_l2b_57_0__tab[] = { UINT64_C(0xbaa70a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_57_0__tab[] = { 0xbaa70a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1915,7 +1923,7 @@ const mp_limb_t mpfr_l2b_57_1__tab[] = { 0xefb0, 0x814f, 0x8e2f, 0x630e, 0xaf8e
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_57_1__tab[] = { 0xefb00000, 0x8e2f814f, 0xaf8e630e };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_57_1__tab[] = { 0xefb0000000000000, 0xaf8e630e8e2f814f };
+const mp_limb_t mpfr_l2b_57_1__tab[] = { UINT64_C(0xefb0000000000000), UINT64_C(0xaf8e630e8e2f814f) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_57_1__tab[] = { 0xaf8e630e8e2f814fefb00000 };
#elif GMP_NUMB_BITS == 128
@@ -1930,7 +1938,7 @@ const mp_limb_t mpfr_l2b_58_0__tab[] = { 0x9600, 0xbb74 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_58_0__tab[] = { 0xbb749600 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_58_0__tab[] = { 0xbb74960000000000 };
+const mp_limb_t mpfr_l2b_58_0__tab[] = { UINT64_C(0xbb74960000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_58_0__tab[] = { 0xbb7496000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1945,7 +1953,7 @@ const mp_limb_t mpfr_l2b_58_1__tab[] = { 0x5d18, 0x41a1, 0x6114, 0xe39d, 0xaecd
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_58_1__tab[] = { 0x5d180000, 0x611441a1, 0xaecde39d };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_58_1__tab[] = { 0x5d18000000000000, 0xaecde39d611441a1 };
+const mp_limb_t mpfr_l2b_58_1__tab[] = { UINT64_C(0x5d18000000000000), UINT64_C(0xaecde39d611441a1) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_58_1__tab[] = { 0xaecde39d611441a15d180000 };
#elif GMP_NUMB_BITS == 128
@@ -1960,7 +1968,7 @@ const mp_limb_t mpfr_l2b_59_0__tab[] = { 0x9e00, 0xbc3e };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_59_0__tab[] = { 0xbc3e9e00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_59_0__tab[] = { 0xbc3e9e0000000000 };
+const mp_limb_t mpfr_l2b_59_0__tab[] = { UINT64_C(0xbc3e9e0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_59_0__tab[] = { 0xbc3e9e000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -1975,7 +1983,7 @@ const mp_limb_t mpfr_l2b_59_1__tab[] = { 0xd000, 0x97df, 0x2f97, 0x4842, 0xae12
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_59_1__tab[] = { 0xd0000000, 0x2f9797df, 0xae124842 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_59_1__tab[] = { 0xd000000000000000, 0xae1248422f9797df };
+const mp_limb_t mpfr_l2b_59_1__tab[] = { UINT64_C(0xd000000000000000), UINT64_C(0xae1248422f9797df) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_59_1__tab[] = { 0xae1248422f9797dfd0000000 };
#elif GMP_NUMB_BITS == 128
@@ -1990,7 +1998,7 @@ const mp_limb_t mpfr_l2b_60_0__tab[] = { 0x4000, 0xbd05 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_60_0__tab[] = { 0xbd054000 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_60_0__tab[] = { 0xbd05400000000000 };
+const mp_limb_t mpfr_l2b_60_0__tab[] = { UINT64_C(0xbd05400000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_60_0__tab[] = { 0xbd0540000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -2005,7 +2013,7 @@ const mp_limb_t mpfr_l2b_60_1__tab[] = { 0xfe58, 0x206d, 0x3555, 0x5b1c, 0xad5b
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_60_1__tab[] = { 0xfe580000, 0x3555206d, 0xad5b5b1c };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_60_1__tab[] = { 0xfe58000000000000, 0xad5b5b1c3555206d };
+const mp_limb_t mpfr_l2b_60_1__tab[] = { UINT64_C(0xfe58000000000000), UINT64_C(0xad5b5b1c3555206d) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_60_1__tab[] = { 0xad5b5b1c3555206dfe580000 };
#elif GMP_NUMB_BITS == 128
@@ -2020,7 +2028,7 @@ const mp_limb_t mpfr_l2b_61_0__tab[] = { 0x9a00, 0xbdc8 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_61_0__tab[] = { 0xbdc89a00 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_61_0__tab[] = { 0xbdc89a0000000000 };
+const mp_limb_t mpfr_l2b_61_0__tab[] = { UINT64_C(0xbdc89a0000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_61_0__tab[] = { 0xbdc89a000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -2035,7 +2043,7 @@ const mp_limb_t mpfr_l2b_61_1__tab[] = { 0x4df8, 0x7757, 0x31cb, 0xe982, 0xaca8
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_61_1__tab[] = { 0x4df80000, 0x31cb7757, 0xaca8e982 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_61_1__tab[] = { 0x4df8000000000000, 0xaca8e98231cb7757 };
+const mp_limb_t mpfr_l2b_61_1__tab[] = { UINT64_C(0x4df8000000000000), UINT64_C(0xaca8e98231cb7757) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_61_1__tab[] = { 0xaca8e98231cb77574df80000 };
#elif GMP_NUMB_BITS == 128
@@ -2050,7 +2058,7 @@ const mp_limb_t mpfr_l2b_62_0__tab[] = { 0xc800, 0xbe88 };
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_62_0__tab[] = { 0xbe88c800 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_62_0__tab[] = { 0xbe88c80000000000 };
+const mp_limb_t mpfr_l2b_62_0__tab[] = { UINT64_C(0xbe88c80000000000) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_62_0__tab[] = { 0xbe88c8000000000000000000 };
#elif GMP_NUMB_BITS == 128
@@ -2065,7 +2073,7 @@ const mp_limb_t mpfr_l2b_62_1__tab[] = { 0x74f8, 0xf905, 0x1831, 0xc3c4, 0xabfa
#elif GMP_NUMB_BITS == 32
const mp_limb_t mpfr_l2b_62_1__tab[] = { 0x74f80000, 0x1831f905, 0xabfac3c4 };
#elif GMP_NUMB_BITS == 64
-const mp_limb_t mpfr_l2b_62_1__tab[] = { 0x74f8000000000000, 0xabfac3c41831f905 };
+const mp_limb_t mpfr_l2b_62_1__tab[] = { UINT64_C(0x74f8000000000000), UINT64_C(0xabfac3c41831f905) };
#elif GMP_NUMB_BITS == 96
const mp_limb_t mpfr_l2b_62_1__tab[] = { 0xabfac3c41831f90574f80000 };
#elif GMP_NUMB_BITS == 128
@@ -2202,7 +2210,7 @@ const __mpfr_struct __gmpfr_l2b[BASE_MAX-1][2] = {
/* returns ceil(e * log2(b)^((-1)^i)), or ... + 1.
For i=0, uses a 23-bit upper approximation to log(beta)/log(2).
- For i=1, uses a 76-bit upper approximation to log(2)/log(beta).
+ For i=1, uses a 77-bit upper approximation to log(2)/log(beta).
Note: this function should be called only in the extended exponent range.
*/
mpfr_exp_t
@@ -2211,20 +2219,20 @@ mpfr_ceil_mul (mpfr_exp_t e, int beta, int i)
mpfr_srcptr p;
mpfr_t t;
mpfr_exp_t r;
+ mp_limb_t tmpmant[MPFR_EXP_LIMB_SIZE];
p = &__gmpfr_l2b[beta-2][i];
- mpfr_init2 (t, sizeof (mpfr_exp_t) * CHAR_BIT);
+ MPFR_TMP_INIT1(tmpmant, t, sizeof (mpfr_exp_t) * CHAR_BIT - 1);
mpfr_set_exp_t (t, e, MPFR_RNDU);
mpfr_mul (t, t, p, MPFR_RNDU);
r = mpfr_get_exp_t (t, MPFR_RNDU);
- mpfr_clear (t);
return r;
}
/* prints the mantissa of x in the string s, and writes the corresponding
exponent in e.
x is rounded with direction rnd, m is the number of digits of the mantissa,
- b is the given base (2 <= b <= 62).
+ |b| is the given base (2 <= b <= 62 or -36 <= b <= -2).
Return value:
if s=NULL, allocates a string to store the mantissa, with
@@ -2232,10 +2240,11 @@ mpfr_ceil_mul (mpfr_exp_t e, int beta, int i)
(thus m+1 or m+2 characters).
Important: when you call this function with s=NULL, don't forget to free
- the memory space allocated, with free(s, strlen(s)).
+ the memory space allocated, with mpfr_free_str.
*/
char*
-mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t rnd)
+mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x,
+ mpfr_rnd_t rnd)
{
const char *num_to_text;
int exact; /* exact result */
@@ -2251,35 +2260,53 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
size_t n, i;
char *s0;
int neg;
- int ret; /* return value of mpfr_get_str_aux */
+ int ret; /* return value of mpfr_get_str_aux */
+ int b0 = b; /* initial base argument, might be negative */
MPFR_ZIV_DECL (loop);
MPFR_SAVE_EXPO_DECL (expo);
- MPFR_TMP_DECL(marker);
+ MPFR_TMP_DECL (marker);
/* if exact = 1 then err is undefined */
/* otherwise err is such that |x*b^(m-g)-a*2^exp_a| < 2^(err+exp_a) */
- /* is the base valid? */
- if (b < 2 || b > 62)
+ MPFR_LOG_FUNC
+ (("b=%d m=%zu x[%Pu]=%.*Rg rnd=%d",
+ b, m, mpfr_get_prec (x), mpfr_log_prec, x, rnd),
+ ("flags=%lx", (unsigned long) __gmpfr_flags));
+
+ /* Is the base argument valid? Valid values are -36 to -2 and 2 to 62. */
+ if (b < -36 || (-2 < b && b < 2) || 62 < b)
return NULL;
- num_to_text = b < 37 ? num_to_text36 : num_to_text62;
+ num_to_text = (2 <= b && b <= 36) ? num_to_text36 : num_to_text62;
+
+ b = (b > 0) ? b : -b;
+
+ /* now b is positive */
+
+ /* map RNDF to RNDN, to avoid problems with specification of mpfr_can_round
+ or mpfr_can_round_raw */
+ if (rnd == MPFR_RNDF)
+ rnd = MPFR_RNDN;
if (MPFR_UNLIKELY (MPFR_IS_NAN (x)))
{
if (s == NULL)
- s = (char *) (*__gmp_allocate_func) (6);
+ s = (char *) mpfr_allocate_func (6);
strcpy (s, "@NaN@");
+ MPFR_LOG_MSG (("%s\n", s));
+ __gmpfr_flags |= MPFR_FLAGS_NAN;
return s;
}
- neg = MPFR_SIGN(x) < 0; /* 0 if positive, 1 if negative */
+ neg = MPFR_IS_NEG (x); /* 0 if positive, 1 if negative */
if (MPFR_UNLIKELY (MPFR_IS_INF (x)))
{
if (s == NULL)
- s = (char *) (*__gmp_allocate_func) (neg + 6);
+ s = (char *) mpfr_allocate_func (neg + 6);
strcpy (s, (neg) ? "-@Inf@" : "@Inf@");
+ MPFR_LOG_MSG (("%s\n", s));
return s;
}
@@ -2302,18 +2329,22 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
m = 2;
}
- /* the code below for non-power-of-two bases works for m=1 */
- MPFR_ASSERTN (m >= 2 || (IS_POW2(b) == 0 && m >= 1));
+ MPFR_LOG_MSG (("m=%zu\n", m));
+
+ /* The code below for non-power-of-two bases works for m=1;
+ this is important for the internal use of mpfr_get_str. */
+ MPFR_ASSERTN (m >= 2 || (!IS_POW2(b) && m >= 1));
/* x is a floating-point number */
- if (MPFR_IS_ZERO(x))
+ if (s == NULL)
+ s = (char *) mpfr_allocate_func (neg + m + 1);
+ s0 = s;
+ if (neg)
+ *s++ = '-';
+
+ if (MPFR_IS_ZERO (x))
{
- if (s == NULL)
- s = (char*) (*__gmp_allocate_func) (neg + m + 1);
- s0 = s;
- if (neg)
- *s++ = '-';
memset (s, '0', m);
s[m] = '\0';
*e = 0; /* a bit like frexp() in ISO C99 */
@@ -2321,15 +2352,9 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
return s0; /* strlen(s0) = neg + m */
}
- if (s == NULL)
- s = (char*) (*__gmp_allocate_func) (neg + m + 1);
- s0 = s;
- if (neg)
- *s++ = '-';
+ xp = MPFR_MANT (x);
- xp = MPFR_MANT(x);
-
- if (IS_POW2(b))
+ if (IS_POW2 (b))
{
int pow2;
mpfr_exp_t f, r;
@@ -2384,22 +2409,24 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
n --;
}
- mpn_get_str ((unsigned char*) s, b, x1, n);
- for (i=0; i<m; i++)
+ mpn_get_str ((unsigned char *) s, b, x1, n);
+ for (i = 0; i < m; i++)
s[i] = num_to_text[(int) s[i]];
s[m] = 0;
/* the exponent of s is f + 1 */
*e = f + 1;
- MPFR_TMP_FREE(marker);
+ MPFR_LOG_MSG (("e=%" MPFR_EXP_FSPEC "d\n", (mpfr_eexp_t) *e));
+
+ MPFR_TMP_FREE (marker);
MPFR_SAVE_EXPO_FREE (expo);
- return (s0);
+ return s0;
}
/* if x < 0, reduce to x > 0 */
if (neg)
- rnd = MPFR_INVERT_RND(rnd);
+ rnd = MPFR_INVERT_RND (rnd);
g = mpfr_ceil_mul (MPFR_GET_EXP (x) - 1, b, 1);
exact = 1;
@@ -2412,7 +2439,7 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
MPFR_ZIV_INIT (loop, prec);
for (;;)
{
- MPFR_TMP_MARK(marker);
+ MPFR_TMP_MARK (marker);
exact = 1;
@@ -2425,7 +2452,7 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
nx = MPFR_LIMB_SIZE (x);
if ((mpfr_exp_t) m == g) /* final exponent is 0, no multiplication or
- division to perform */
+ division to perform */
{
if (nx > n)
exact = mpn_scan1 (xp, 0) >= (nx - n) * GMP_NUMB_BITS;
@@ -2515,41 +2542,48 @@ mpfr_get_str (char *s, mpfr_exp_t *e, int b, size_t m, mpfr_srcptr x, mpfr_rnd_t
/* check if rounding is possible */
if (exact)
err = -1;
- ret = mpfr_get_str_aux (s, e, a, n, exp_a, err, b, m, rnd);
+
+ ret = mpfr_get_str_aux (s, e, a, n, exp_a, err, b0, m, rnd);
+
+ MPFR_TMP_FREE (marker);
+
if (ret == MPFR_ROUND_FAILED)
{
/* too large error: increment the working precision */
MPFR_ZIV_NEXT (loop, prec);
}
- else if (ret == -MPFR_ROUND_FAILED)
+ else if (ret == - MPFR_ROUND_FAILED)
{
/* too many digits in mantissa: exp = |m-g| */
if ((mpfr_exp_t) m > g) /* exp = m - g, multiply by b^exp */
{
- g++;
+ g ++;
exp --;
}
else /* exp = g - m, divide by b^exp */
{
- g++;
+ g ++;
exp ++;
}
}
else
- break;
-
- MPFR_TMP_FREE(marker);
+ {
+ if (ret != 0)
+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, MPFR_FLAGS_INEXACT);
+ break;
+ }
}
MPFR_ZIV_FREE (loop);
*e += g;
- MPFR_TMP_FREE(marker);
+ MPFR_LOG_MSG (("e=%" MPFR_EXP_FSPEC "d\n", (mpfr_eexp_t) *e));
+
MPFR_SAVE_EXPO_FREE (expo);
return s0;
}
void mpfr_free_str (char *str)
{
- (*__gmp_free_func) (str, strlen (str) + 1);
+ mpfr_free_func (str, strlen (str) + 1);
}