Lines Matching refs:digit
248 // 0-indexed position of most significant bit in the most significant digit.
253 // Next digit under construction.
254 digit_t digit;
259 digit = mantissa >> remaining_mantissa_bits;
263 digit = mantissa << (msd_topbit - kMantissaTopBit);
266 result->set_digit(digits - 1, digit);
271 if (sizeof(digit) == 4) {
272 digit = mantissa >> 32;
275 DCHECK_EQ(sizeof(digit), 8);
276 digit = mantissa;
280 digit = 0;
282 result->set_digit(digit_index, digit);
320 while (new_length > 0 && result.digit(new_length - 1) == 0) new_length--;
341 result.digit(result.length() - 1) != 0); // MSD is non-zero.
390 if (base->length() == 1 && base->digit(0) == 1) {
392 if (base->sign() && (exponent->digit(0) & 1) == 0) {
404 digit_t exp_value = exponent->digit(0);
411 if (base->length() == 1 && base->digit(0) == 2) {
482 if (y->length() == 1 && y->digit(0) == 1) {
512 if (y->length() == 1 && y->digit(0) == 1) return Zero(isolate);
627 if (x.digit(i) != y.digit(i)) return false;
779 // Any multi-digit BigInt is bigger than a Smi.
782 (x->digit(0) ==
803 // Any multi-digit BigInt is bigger than a Smi.
808 digit_t x_digit = x->digit(0);
851 digit_t x_msd = x->digit(x_length - 1);
876 // Shifted chunk of {mantissa} for comparing with {digit}.
882 // First, compare the most significant digit against the beginning of
911 digit_t digit = x->digit(digit_index);
912 if (digit > compare_mantissa) return AbsoluteGreater(x_sign);
913 if (digit < compare_mantissa) return AbsoluteLess(x_sign);
938 digit_t digit = bigint->digit(0);
939 int bit_length = kDigitBits - base::bits::CountLeadingZeros(digit);
951 while (digit != 0) {
952 *(--out) = '0' + (digit % 10);
953 digit /= 10;
1079 if (x->length() == 1 && x->digit(0) < Smi::kMaxValue) {
1080 int value = static_cast<int>(x->digit(0));
1091 digit_t x_msd = x->digit(x_length - 1);
1109 current_digit = static_cast<uint64_t>(x->digit(digit_index));
1116 current_digit = static_cast<uint64_t>(x->digit(digit_index));
1156 // {current_digit} fit the mantissa exactly; look at the next digit.
1159 current_digit = static_cast<uint64_t>(x->digit(digit_index));
1172 if (x->digit(digit_index) != 0) return kRoundUp;
1185 os << digit(0);
1199 // The addition will overflow into a new digit if all existing digits are
1203 if (!digit_ismax(x->digit(i))) {
1220 result->set_digit(0, x->digit(0) + 1);
1235 result->set_digit(0, x->digit(0) - 1);
1251 x->length(), x->digit(x->length() - 1), shift);
1299 digit_t value = x->digit(0);
1358 const digit_t* digit = reinterpret_cast<const digit_t*>(digits);
1360 *digit_storage = ByteReverse(*digit);
1362 digit++;
1387 digit_t* digit = reinterpret_cast<digit_t*>(digits);
1391 *digit = ByteReverse(*digit_storage);
1393 digit++;
1396 *digit = 0;
1397 byte* digit_byte = reinterpret_cast<byte*>(digit);
1398 digit_byte += sizeof(*digit) - 1;
1534 for (int i = 0; i < len && i < available_words; ++i) words[i] = digit(i);
1537 uint64_t lo = digit(i);
1538 uint64_t hi = (i + 1) < len ? digit(i + 1) : 0;
1551 uint64_t raw = static_cast<uint64_t>(x.digit(0));
1553 raw |= static_cast<uint64_t>(x.digit(1)) << 32;
1592 os << "\n 0x" << std::hex << digit(i);