Home | History | Annotate | Download | only in lib

Lines Matching refs:mp_limb_t

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