Lines Matching refs:digit
121 ((PY_SSIZE_T_MAX - offsetof(PyLongObject, ob_digit))/sizeof(digit))
138 size*sizeof(digit)); in _PyLong_New()
205 abs_ival, unsigned long, digit); in PyLong_FromLong()
217 abs_ival & PyLong_MASK, unsigned long, digit); in PyLong_FromLong()
219 abs_ival >> PyLong_SHIFT, unsigned long, digit); in PyLong_FromLong()
233 digit *p = v->ob_digit; in PyLong_FromLong()
238 t & PyLong_MASK, unsigned long, digit); in PyLong_FromLong()
261 digit *p = v->ob_digit; \
263 *p++ = (digit)((ival) & PyLong_MASK); \
339 digit bits = (digit)frac; in PyLong_FromDouble()
694 bit_length_digit(digit x) in bit_length_digit()
713 digit msd = v->ob_digit[ndigits - 1]; in _PyLong_NumBits()
822 v->ob_digit[idigit] = (digit)(accum & PyLong_MASK); in _PyLong_FromByteArray()
832 v->ob_digit[idigit] = (digit)accum; in _PyLong_FromByteArray()
851 digit carry; /* for computing 2's-comp */ in _PyLong_AsByteArray()
891 digit thisdigit = v->ob_digit[i]; in _PyLong_AsByteArray()
908 digit s = do_twos_comp ? thisdigit ^ PyLong_MASK : thisdigit; in _PyLong_AsByteArray()
1064 digit *p = v->ob_digit; in PyLong_FromLongLong()
1068 *p++ = (digit)(t & PyLong_MASK); in PyLong_FromLongLong()
1107 digit *p = v->ob_digit; in PyLong_FromSsize_t()
1111 *p++ = (digit)(t & PyLong_MASK); in PyLong_FromSsize_t()
1454 static digit
1455 v_iadd(digit *x, Py_ssize_t m, digit *y, Py_ssize_t n) in v_iadd()
1458 digit carry = 0; in v_iadd()
1480 static digit
1481 v_isub(digit *x, Py_ssize_t m, digit *y, Py_ssize_t n) in v_isub()
1484 digit borrow = 0; in v_isub()
1505 static digit
1506 v_lshift(digit *z, digit *a, Py_ssize_t m, int d) in v_lshift()
1509 digit carry = 0; in v_lshift()
1514 z[i] = (digit)acc & PyLong_MASK; in v_lshift()
1515 carry = (digit)(acc >> PyLong_SHIFT); in v_lshift()
1523 static digit
1524 v_rshift(digit *z, digit *a, Py_ssize_t m, int d) in v_rshift()
1527 digit carry = 0; in v_rshift()
1528 digit mask = ((digit)1 << d) - 1U; in v_rshift()
1533 carry = (digit)acc & mask; in v_rshift()
1534 z[i] = (digit)(acc >> d); in v_rshift()
1545 static digit
1546 inplace_divrem1(digit *pout, digit *pin, Py_ssize_t size, digit n) in inplace_divrem1()
1554 digit hi; in inplace_divrem1()
1556 *--pout = hi = (digit)(rem / n); in inplace_divrem1()
1559 return (digit)rem; in inplace_divrem1()
1567 divrem1(PyLongObject *a, digit n, digit *prem) in divrem1()
1594 digit *pout, *pin, rem, tenpow; in long_to_decimal_string_internal()
1636 digit hi = pin[i]; in long_to_decimal_string_internal()
1639 hi = (digit)(z / _PyLong_DECIMAL_BASE); in long_to_decimal_string_internal()
1640 pout[j] = (digit)(z - (twodigits)hi * in long_to_decimal_string_internal()
2046 digit *pdigit; in long_from_binary_base()
2103 *pdigit++ = (digit)(accum & PyLong_MASK); in long_from_binary_base()
2112 *pdigit++ = (digit)accum; in long_from_binary_base()
2289 digit *pz, *pzstop; in PyLong_FromString()
2388 c = (digit)_PyLong_DigitValue[Py_CHARMASK(*str++)]; in PyLong_FromString()
2415 *pz = (digit)(c & PyLong_MASK); in PyLong_FromString()
2422 *pz = (digit)c; in PyLong_FromString()
2436 sizeof(digit) * size_z); in PyLong_FromString()
2439 z->ob_digit[size_z] = (digit)c; in PyLong_FromString()
2584 digit rem = 0; in long_divrem()
2631 digit wm1, wm2, carry, q, r, vtop, *v0, *vk, *w0, *ak; in x_divrem()
2700 q = (digit)(vv / wm1); in x_divrem()
2701 r = (digit)(vv - (twodigits)wm1 * q); /* r = vv % wm1 */ in x_divrem()
2718 vk[i] = (digit)z & PyLong_MASK; in x_divrem()
2768 digit rem; in _PyLong_Frexp()
2769 digit x_digits[2 + (DBL_MANT_DIG + 1) / PyLong_SHIFT] = {0,}; in _PyLong_Frexp()
3007 digit carry = 0; in x_add()
3042 digit borrow = 0; in x_sub()
3169 memset(z->ob_digit, 0, Py_SIZE(z) * sizeof(digit)); in x_mul()
3180 digit *pz = z->ob_digit + (i << 1); in x_mul()
3181 digit *pa = a->ob_digit + i + 1; in x_mul()
3182 digit *paend = a->ob_digit + size_a; in x_mul()
3190 *pz++ = (digit)(carry & PyLong_MASK); in x_mul()
3200 *pz++ = (digit)(carry & PyLong_MASK); in x_mul()
3206 *pz++ = (digit)(carry & PyLong_MASK); in x_mul()
3210 *pz += (digit)(carry & PyLong_MASK); in x_mul()
3218 digit *pz = z->ob_digit + i; in x_mul()
3219 digit *pb = b->ob_digit; in x_mul()
3220 digit *pbend = b->ob_digit + size_b; in x_mul()
3229 *pz++ = (digit)(carry & PyLong_MASK); in x_mul()
3234 *pz += (digit)(carry & PyLong_MASK); in x_mul()
3268 memcpy(lo->ob_digit, n->ob_digit, size_lo * sizeof(digit)); in kmul_split()
3269 memcpy(hi->ob_digit, n->ob_digit + size_lo, size_hi * sizeof(digit)); in kmul_split()
3369 memset(ret->ob_digit, 0xDF, Py_SIZE(ret) * sizeof(digit)); in k_mul()
3377 Py_SIZE(t1) * sizeof(digit)); in k_mul()
3383 i * sizeof(digit)); in k_mul()
3392 memcpy(ret->ob_digit, t2->ob_digit, Py_SIZE(t2) * sizeof(digit)); in k_mul()
3397 memset(ret->ob_digit + Py_SIZE(t2), 0, i * sizeof(digit)); in k_mul()
3519 memset(ret->ob_digit, 0, Py_SIZE(ret) * sizeof(digit)); in k_lopsided_mul()
3533 nbtouse * sizeof(digit)); in k_lopsided_mul()
3737 digit mask, low; in long_true_divide()
3891 digit rem; in long_true_divide()
3912 digit rem; in long_true_divide()
3933 digit rem = inplace_divrem1(x->ob_digit, x->ob_digit, x_size, in long_true_divide()
3959 mask = (digit)1 << (extra_bits - 1); in long_true_divide()
4273 digit bi = b->ob_digit[i]; in long_pow()
4275 for (j = (digit)1 << (PyLong_SHIFT-1); j != 0; j >>= 1) { in long_pow()
4290 const digit bi = b->ob_digit[i]; in long_pow()
4372 divmod_shift(PyObject *shiftby, Py_ssize_t *wordshift, digit *remshift) in divmod_shift()
4392 if (*wordshift >= 0 && *wordshift < PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(digit)) { in divmod_shift()
4398 *wordshift = PY_SSIZE_T_MAX / sizeof(digit); in divmod_shift()
4404 long_rshift1(PyLongObject *a, Py_ssize_t wordshift, digit remshift) in long_rshift1()
4408 digit lomask, himask; in long_rshift1()
4428 lomask = ((digit)1 << hishift) - 1; in long_rshift1()
4447 digit remshift; in long_rshift()
4468 digit remshift; in _PyLong_Rshift()
4480 long_lshift1(PyLongObject *a, Py_ssize_t wordshift, digit remshift) in long_lshift1()
4503 z->ob_digit[i] = (digit)(accum & PyLong_MASK); in long_lshift1()
4507 z->ob_digit[newsize-1] = (digit)accum; in long_lshift1()
4518 digit remshift; in long_lshift()
4539 digit remshift; in _PyLong_Lshift()
4555 v_complement(digit *z, digit *a, Py_ssize_t m) in v_complement()
4558 digit carry = 1; in v_complement()
4676 (size_z-i)*sizeof(digit)); in long_bitwise()
4735 digit *a_digit, *b_digit, *c_digit, *d_digit, *a_end, *b_end; in _PyLong_GCD()
4868 *c_digit++ = (digit)(c_carry & PyLong_MASK); in _PyLong_GCD()
4869 *d_digit++ = (digit)(d_carry & PyLong_MASK); in _PyLong_GCD()
4876 *c_digit++ = (digit)(c_carry & PyLong_MASK); in _PyLong_GCD()
4877 *d_digit++ = (digit)(d_carry & PyLong_MASK); in _PyLong_GCD()
5268 res = offsetof(PyLongObject, ob_digit) + Py_ABS(Py_SIZE(self))*sizeof(digit); in int___sizeof___impl()
5290 digit msd; in int_bit_length_impl()
5337 popcount_digit(digit d) in popcount_digit()
5653 sizeof(digit), /* tp_itemsize */
5727 PyLong_FromLong(sizeof(digit))); in PyLong_GetInfo()
5759 v->ob_digit[0] = (digit)abs(ival); in _PyLong_Init()