Lines Matching refs:mp_limb_t
324 typedef unsigned int mp_limb_t; typedef
326 verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
336 mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */
345 const mp_limb_t *p1; in multiply()
346 const mp_limb_t *p2; in multiply()
369 dest->limbs = (mp_limb_t *) malloc (1); in multiply()
375 mp_limb_t *dp; in multiply()
379 dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); in multiply()
386 mp_limb_t digit1 = p1[i]; in multiply()
390 mp_limb_t digit2 = p2[j]; in multiply()
393 dp[i + j] = (mp_limb_t) carry; in multiply()
396 dp[i + len2] = (mp_limb_t) carry; in multiply()
468 const mp_limb_t *a_ptr = a.limbs; in divide()
470 const mp_limb_t *b_ptr = b.limbs; in divide()
472 mp_limb_t *roomptr; in divide()
473 mp_limb_t *tmp_roomptr = NULL; in divide()
474 mp_limb_t *q_ptr; in divide()
476 mp_limb_t *r_ptr; in divide()
482 roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); in divide()
509 memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); in divide()
520 mp_limb_t den = b_ptr[0]; in divide()
521 mp_limb_t remainder = 0; in divide()
522 const mp_limb_t *sourceptr = a_ptr + a_len; in divide()
523 mp_limb_t *destptr = q_ptr + a_len; in divide()
554 mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ in divide()
615 tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); in divide()
622 const mp_limb_t *sourceptr = b_ptr; in divide()
623 mp_limb_t *destptr = tmp_roomptr; in divide()
629 *destptr++ = (mp_limb_t) accu; in divide()
645 memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); in divide()
650 const mp_limb_t *sourceptr = a_ptr; in divide()
651 mp_limb_t *destptr = r_ptr; in divide()
657 *destptr++ = (mp_limb_t) accu; in divide()
660 *destptr++ = (mp_limb_t) accu; in divide()
666 mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ in divide()
667 mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ in divide()
674 mp_limb_t q_star; in divide()
675 mp_limb_t c1; in divide()
688 q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ in divide()
725 mp_limb_t cr; in divide()
727 const mp_limb_t *sourceptr = b_ptr; in divide()
728 mp_limb_t *destptr = r_ptr + j; in divide()
737 + (mp_limb_t) ~(*destptr); in divide()
739 *destptr++ = ~(mp_limb_t) carry; in divide()
742 cr = (mp_limb_t) carry; in divide()
752 const mp_limb_t *sourceptr = b_ptr; in divide()
753 mp_limb_t *destptr = r_ptr + j; in divide()
754 mp_limb_t carry = 0; in divide()
758 mp_limb_t source1 = *sourceptr++; in divide()
759 mp_limb_t source2 = *destptr; in divide()
763 ? source1 >= (mp_limb_t) ~source2 in divide()
764 : source1 > (mp_limb_t) ~source2); in divide()
786 mp_limb_t ptr = r_ptr + r_len; in divide()
791 accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; in divide()
793 *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); in divide()
808 mp_limb_t r_i = in divide()
811 mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); in divide()
848 mp_limb_t *a_ptr = a.limbs; in convert_to_decimal()
861 mp_limb_t remainder = 0; in convert_to_decimal()
862 mp_limb_t *ptr = a_ptr + a_len; in convert_to_decimal()
909 m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); in decode_long_double()
926 mp_limb_t hi, lo; in decode_long_double()
927 y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); in decode_long_double()
932 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_long_double()
941 mp_limb_t d; in decode_long_double()
942 y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); in decode_long_double()
953 mp_limb_t hi, lo; in decode_long_double()
954 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_long_double()
959 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_long_double()
997 m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); in decode_double()
1014 mp_limb_t hi, lo; in decode_double()
1015 y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); in decode_double()
1020 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_double()
1029 mp_limb_t d; in decode_double()
1030 y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); in decode_double()
1041 mp_limb_t hi, lo; in decode_double()
1042 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_double()
1047 y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); in decode_double()
1078 mp_limb_t *pow5_ptr; in scale10_round_decimal_decoded()
1108 pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 in scale10_round_decimal_decoded()
1110 * sizeof (mp_limb_t)); in scale10_round_decimal_decoded()
1122 static mp_limb_t const small_pow5[13 + 1] = in scale10_round_decimal_decoded()
1130 mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; in scale10_round_decimal_decoded()
1135 mp_limb_t digit2 = pow5_ptr[j]; in scale10_round_decimal_decoded()
1137 pow5_ptr[j] = (mp_limb_t) carry; in scale10_round_decimal_decoded()
1141 pow5_ptr[pow5_len++] = (mp_limb_t) carry; in scale10_round_decimal_decoded()
1151 mp_limb_t *ptr = pow5_ptr; in scale10_round_decimal_decoded()
1157 *ptr++ = (mp_limb_t) accu; in scale10_round_decimal_decoded()
1162 *ptr = (mp_limb_t) accu; in scale10_round_decimal_decoded()
1214 mp_limb_t *ptr = pow5_ptr + pow5_len; in scale10_round_decimal_decoded()
1218 ptr[s_limbs] = (mp_limb_t) 1 << s_bits; in scale10_round_decimal_decoded()
1230 mp_limb_t *num_ptr; in scale10_round_decimal_decoded()
1231 num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) in scale10_round_decimal_decoded()
1232 * sizeof (mp_limb_t)); in scale10_round_decimal_decoded()
1240 mp_limb_t *destptr = num_ptr; in scale10_round_decimal_decoded()
1248 const mp_limb_t *sourceptr = m.limbs; in scale10_round_decimal_decoded()
1254 *destptr++ = (mp_limb_t) accu; in scale10_round_decimal_decoded()
1258 *destptr++ = (mp_limb_t) accu; in scale10_round_decimal_decoded()
1262 const mp_limb_t *sourceptr = m.limbs; in scale10_round_decimal_decoded()