Lines Matching defs:digits
47 // digits that will be added by multiplying 5^i by 2^i. If the number is less
121 // 800 is an arbitrary number of digits, but should be
128 uint8_t digits[MAX_NUM_DIGITS];
138 // The above condition handles all cases where all of the trailing digits
149 // If we're right in the middle and there are no extra digits
150 if (this->digits[round_to_digit] == 5 &&
163 return this->digits[round_to_digit - 1] % 2 != 0;
165 // If there are digits after round_to_digit, they must be non-zero since we
166 // trim trailing zeroes after all operations that change digits.
167 return this->digits[round_to_digit] >= 5;
170 // Takes an amount to left shift and returns the number of new digits needed
181 if (this->digits[digit_index] !=
184 ((this->digits[digit_index] <
196 while (this->num_digits > 0 && this->digits[this->num_digits - 1] == 0) {
215 // Warm Up phase: we don't have enough digits to start writing, so just
219 // If there are still digits to read, read the next one, else the digit is
222 read_digit = this->digits[read_index];
228 // Shift the decimal point by the number of digits it took to fill the
232 // Middle phase: we have enough digits to write, as well as more digits to
233 // read. Keep reading until we run out of digits.
235 uint64_t read_digit = this->digits[read_index];
238 this->digits[write_index] = static_cast<uint8_t>(write_digit);
244 // Cool Down phase: All of the readable digits have been read, so just write
245 // the remainder, while treating any more digits as 0.
250 this->digits[write_index] = static_cast<uint8_t>(write_digit);
272 // No Warm Up phase. Since we're putting digits in at the top and taking
273 // digits from the bottom we don't have to wait for the accumulator to fill.
275 // Middle phase: while we have more digits to read, keep reading as well as
278 accumulator += static_cast<uint64_t>(this->digits[read_index])
284 this->digits[write_index] = static_cast<uint8_t>(write_digit);
292 // Cool Down phase: there are no more digits to read, so just write the
293 // remaining digits in the accumulator.
299 this->digits[write_index] = static_cast<uint8_t>(write_digit);
323 // This counts the digits in the number, even if there isn't space to store
342 this->digits[this->num_digits] = static_cast<uint8_t>(
418 result = result * 10 + (this->digits[cur_digit]);
433 LIBC_INLINE uint8_t *get_digits() { return this->digits; }