BITS_PER_MP_LIMB
res_ptr[N - 1] |= 1L << (DBL_MANT_DIG - 1 - ((N - 1) * BITS_PER_MP_LIMB));
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
#define NUM_LEADING_ZEROS (BITS_PER_MP_LIMB \
- (DBL_MANT_DIG - ((N - 1) * BITS_PER_MP_LIMB)))
* (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
res_ptr[0] <<= BITS_PER_MP_LIMB - (NUM_LEADING_ZEROS - cnt);
- (BITS_PER_MP_LIMB - NUM_LEADING_ZEROS) - cnt;
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
| (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
*expt = LDBL_MIN_EXP - 1 - BITS_PER_MP_LIMB - cnt;
sh_2 = BITS_PER_MP_LIMB - sh_1;
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
#if BITS_PER_MP_LIMB > FLT_MANT_DIG
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
sh_2 = BITS_PER_MP_LIMB - sh_1;
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
| (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
*expt = LDBL_MIN_EXP - 1 - BITS_PER_MP_LIMB - cnt;
#if BITS_PER_MP_LIMB == 32
#elif BITS_PER_MP_LIMB == 64
res_ptr[N - 1] &= ~(1L << ((LDBL_MANT_DIG - 1) % BITS_PER_MP_LIMB));
| (res_ptr[0] >> (BITS_PER_MP_LIMB - cnt));
*expt = LDBL_MIN_EXP - 1 - BITS_PER_MP_LIMB - cnt;
# if BITS_PER_MP_LIMB == 32
mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB); \
if (BITS_PER_MP_LIMB == 32) \
for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt) \
if (BITS_PER_MP_LIMB % BITS != 0) \
& ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
<< BITS_PER_MP_LIMB % BITS); \
work_hi >>= BITS - BITS_PER_MP_LIMB % BITS; \
# if BITS_PER_MP_LIMB == 64
# if BITS_PER_MP_LIMB == 32
#if BITS_PER_MP_LIMB == 32
# if BITS_PER_MP_LIMB == 64
mp_limb_t work_hi = value >> (64 - BITS_PER_MP_LIMB); \
if (BITS_PER_MP_LIMB == 32) \
for (cnt = BITS_PER_MP_LIMB / BITS; cnt > 0; --cnt) \
if (BITS_PER_MP_LIMB % BITS != 0) \
& ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
<< BITS_PER_MP_LIMB % BITS); \
work_hi >>= BITS - BITS_PER_MP_LIMB % BITS; \
# if BITS_PER_MP_LIMB == 64
# if BITS_PER_MP_LIMB == 32
#if BITS_PER_MP_LIMB == 32
mp_limb_t fp_input[(LDBL_MANT_DIG + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB];
to_shift = 1 + p.fracsize * BITS_PER_MP_LIMB - LDBL_MANT_DIG;
to_shift = 1 + p.fracsize * BITS_PER_MP_LIMB - DBL_MANT_DIG;
mp_size_t bignum_size = ((ABS (p.exponent) + BITS_PER_MP_LIMB - 1)
/ BITS_PER_MP_LIMB
+ (LDBL_MANT_DIG / BITS_PER_MP_LIMB > 2 ? 8 : 4))
if ((p.exponent + to_shift) % BITS_PER_MP_LIMB == 0)
MPN_COPY_DECR (p.frac + (p.exponent + to_shift) / BITS_PER_MP_LIMB,
p.fracsize += (p.exponent + to_shift) / BITS_PER_MP_LIMB;
(p.exponent + to_shift) / BITS_PER_MP_LIMB,
(p.exponent + to_shift) % BITS_PER_MP_LIMB);
p.fracsize += (p.exponent + to_shift) / BITS_PER_MP_LIMB;
MPN_ZERO (p.frac, (p.exponent + to_shift) / BITS_PER_MP_LIMB);
if (LDBL_MANT_DIG > _FPIO_CONST_OFFSET * BITS_PER_MP_LIMB
(((LDBL_MANT_DIG + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB) \
p.exponent += _FPIO_CONST_SHIFT * BITS_PER_MP_LIMB;
scaleexpo = (p.scalesize - 2) * BITS_PER_MP_LIMB - cnt - 1;
if (i == 0 && BITS_PER_MP_LIMB - cnt_h > cnt_l)
else if (BITS_PER_MP_LIMB - cnt_h <= cnt_l)
BITS_PER_MP_LIMB - cnt_h);
BITS_PER_MP_LIMB - cnt_h);
BITS_PER_MP_LIMB - cnt_h);
BITS_PER_MP_LIMB - cnt_h);
incr = (p.tmpsize - p.fracsize) * BITS_PER_MP_LIMB
+ BITS_PER_MP_LIMB - 1 - cnt_h;
if (cnt_h <= BITS_PER_MP_LIMB - 4)
= ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4 - cnt_h);
topval[0] = ((mp_limb_t) 10) << (BITS_PER_MP_LIMB - 4);
BITS_PER_MP_LIMB - cnt_h);
if (cnt_h == BITS_PER_MP_LIMB - 1)
if (i == 0 && BITS_PER_MP_LIMB - 1 - cnt_h > cnt_l)
else if (BITS_PER_MP_LIMB - 1 - cnt_h <= cnt_l)
BITS_PER_MP_LIMB - 1 - cnt_h);
BITS_PER_MP_LIMB - 1 - cnt_h);
BITS_PER_MP_LIMB - MIN (4, p.exponent));
p.exponent + to_shift < BITS_PER_MP_LIMB);
#elif BITS_PER_MP_LIMB == 64
#if BITS_PER_MP_LIMB == 32
#if BITS_PER_MP_LIMB == 32
n2 = ((nh) << (BITS_PER_MP_LIMB - (lgup))) + ((nl) >> 1 >> (l - 1));\
n10 = (nl) << (BITS_PER_MP_LIMB - (lgup)); \
n1 = ((mp_limb_signed_t) n10 >> (BITS_PER_MP_LIMB - 1)); \
n1 = ((mp_limb_signed_t) n10 >> (BITS_PER_MP_LIMB - 1)); \
#define W_TYPE_SIZE BITS_PER_MP_LIMB
val <<= BITS_PER_MP_LIMB - (4 - pos - 1);
BITS_PER_MP_LIMB - 1, dig_no > 0);
pos = BITS_PER_MP_LIMB - 1 - (4 - pos - 1);
bits = numsize * BITS_PER_MP_LIMB - bits;
const mp_size_t least_idx = (bits - MANT_DIG) / BITS_PER_MP_LIMB;
const mp_size_t least_bit = (bits - MANT_DIG) % BITS_PER_MP_LIMB;
const mp_size_t round_bit = least_bit == 0 ? BITS_PER_MP_LIMB - 1
<< (BITS_PER_MP_LIMB - least_bit));
const mp_size_t target_bit = (MANT_DIG - 1) % BITS_PER_MP_LIMB;
const mp_size_t is_bit = (bits - 1) % BITS_PER_MP_LIMB;
cnt = BITS_PER_MP_LIMB; \
if (BITS_PER_MP_LIMB - cnt > MANT_DIG) \
retval[0] = quot >> (BITS_PER_MP_LIMB - used); \
else if (bits + BITS_PER_MP_LIMB <= MANT_DIG) \
__mpn_lshift_1 (retval, RETURN_LIMB_SIZE, BITS_PER_MP_LIMB, \
bits += BITS_PER_MP_LIMB
quot, BITS_PER_MP_LIMB - 1 - used,
exponent -= BITS_PER_MP_LIMB;
if (bits + BITS_PER_MP_LIMB <= MANT_DIG)
BITS_PER_MP_LIMB, 0);
bits += BITS_PER_MP_LIMB;
quot, BITS_PER_MP_LIMB - 1 - used,
exponent -= empty * BITS_PER_MP_LIMB;
if (bits + empty * BITS_PER_MP_LIMB <= MANT_DIG)
BITS_PER_MP_LIMB, 0);
if (used >= BITS_PER_MP_LIMB)
/ BITS_PER_MP_LIMB],
used % BITS_PER_MP_LIMB);
for (i = used / BITS_PER_MP_LIMB; i >= 0; --i)
bits += empty * BITS_PER_MP_LIMB;
#if BITS_PER_MP_LIMB == 32
quot, BITS_PER_MP_LIMB - 1 - used,
#elif BITS_PER_MP_LIMB == 64
#if BITS_PER_MP_LIMB > 32
#if BITS_PER_MP_LIMB > 64
#define RETURN_LIMB_SIZE howmany (MANT_DIG, BITS_PER_MP_LIMB)
#define MPNSIZE (howmany (MAX_EXP + 2 * MANT_DIG, BITS_PER_MP_LIMB) \
round_bit = (MANT_DIG - 1) % BITS_PER_MP_LIMB;
else if (shift >= BITS_PER_MP_LIMB)
round_limb = retval[(shift - 1) / BITS_PER_MP_LIMB];
round_bit = (shift - 1) % BITS_PER_MP_LIMB;
for (i = 0; i < (shift - 1) / BITS_PER_MP_LIMB; ++i)
(void) __mpn_rshift (retval, &retval[shift / BITS_PER_MP_LIMB],
RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB),
shift % BITS_PER_MP_LIMB);
MPN_ZERO (&retval[RETURN_LIMB_SIZE - (shift / BITS_PER_MP_LIMB)],
shift / BITS_PER_MP_LIMB);
if (((MANT_DIG % BITS_PER_MP_LIMB) == 0 && cy) ||
((MANT_DIG % BITS_PER_MP_LIMB) != 0 &&
& (((mp_limb_t) 1) << (MANT_DIG % BITS_PER_MP_LIMB))) != 0))
|= ((mp_limb_t) 1) << ((MANT_DIG - 1) % BITS_PER_MP_LIMB);
& (((mp_limb_t) 1) << ((MANT_DIG - 1) % BITS_PER_MP_LIMB)))
if (count == BITS_PER_MP_LIMB)
ptr[0] |= limb >> (BITS_PER_MP_LIMB - count);
int idx = (MANT_DIG - 1) / BITS_PER_MP_LIMB;
int pos = (MANT_DIG - 1) % BITS_PER_MP_LIMB;
retval[idx] = val << (BITS_PER_MP_LIMB - (bits - pos - 1));
pos = BITS_PER_MP_LIMB - 1 - (bits - pos - 1);