Lines Matching refs:this
116 static_cast<uint32_t>(roundToDigit) >= this->num_digits) { in should_round_up()
121 if (this->digits[roundToDigit] == 5 && in should_round_up()
122 static_cast<uint32_t>(roundToDigit + 1) == this->num_digits) { in should_round_up()
126 if (this->truncated) { in should_round_up()
134 return this->digits[roundToDigit - 1] % 2 != 0; in should_round_up()
138 return this->digits[roundToDigit] >= 5; in should_round_up()
149 if (digit_index >= this->num_digits) { in get_num_new_digits()
152 if (this->digits[digit_index] != power_of_five[digit_index] - '0') { in get_num_new_digits()
154 ((this->digits[digit_index] < power_of_five[digit_index] - '0') in get_num_new_digits()
165 while (this->num_digits > 0 && this->digits[this->num_digits - 1] == 0) { in trim_trailing_zeroes()
166 --this->num_digits; in trim_trailing_zeroes()
168 if (this->num_digits == 0) { in trim_trailing_zeroes()
169 this->decimal_point = 0; in trim_trailing_zeroes()
190 if (read_index < this->num_digits) { in right_shift()
191 read_digit = this->digits[read_index]; in right_shift()
199 this->decimal_point -= read_index - 1; in right_shift()
203 while (read_index < this->num_digits) { in right_shift()
204 uint64_t read_digit = this->digits[read_index]; in right_shift()
207 this->digits[write_index] = static_cast<uint8_t>(write_digit); in right_shift()
219 this->digits[write_index] = static_cast<uint8_t>(write_digit); in right_shift()
222 this->truncated = true; in right_shift()
226 this->num_digits = write_index; in right_shift()
227 this->trim_trailing_zeroes(); in right_shift()
234 uint32_t new_digits = this->get_num_new_digits(shiftAmount); in left_shift()
236 int32_t read_index = this->num_digits - 1; in left_shift()
237 uint32_t write_index = this->num_digits + new_digits; in left_shift()
247 accumulator += static_cast<uint64_t>(this->digits[read_index]) in left_shift()
253 this->digits[write_index] = static_cast<uint8_t>(write_digit); in left_shift()
255 this->truncated = true; in left_shift()
268 this->digits[write_index] = static_cast<uint8_t>(write_digit); in left_shift()
270 this->truncated = true; in left_shift()
275 this->num_digits += new_digits; in left_shift()
276 if (this->num_digits > MAX_NUM_DIGITS) { in left_shift()
277 this->num_digits = MAX_NUM_DIGITS; in left_shift()
279 this->decimal_point += new_digits; in left_shift()
280 this->trim_trailing_zeroes(); in left_shift()
296 this->decimal_point = total_digits; in HighPrecisionDecimal()
299 if (*numString == '0' && this->num_digits == 0) { in HighPrecisionDecimal()
300 --this->decimal_point; in HighPrecisionDecimal()
305 if (this->num_digits < MAX_NUM_DIGITS) { in HighPrecisionDecimal()
306 this->digits[this->num_digits] = in HighPrecisionDecimal()
308 ++this->num_digits; in HighPrecisionDecimal()
310 this->truncated = true; in HighPrecisionDecimal()
317 this->decimal_point = total_digits; in HighPrecisionDecimal()
328 this->decimal_point += add_to_exp; in HighPrecisionDecimal()
332 this->trim_trailing_zeroes(); in HighPrecisionDecimal()
343 this->left_shift(MAX_SHIFT_AMOUNT); in shift()
346 this->left_shift(shiftAmount); in shift()
351 this->right_shift(MAX_SHIFT_AMOUNT); in shift()
354 this->right_shift(-shiftAmount); in shift()
364 while (static_cast<int32_t>(cur_digit) < this->decimal_point && in round_to_integer_type()
365 cur_digit < this->num_digits) { in round_to_integer_type()
366 result = result * 10 + (this->digits[cur_digit]); in round_to_integer_type()
371 while (static_cast<int32_t>(cur_digit) < this->decimal_point) { in round_to_integer_type()
375 if (this->should_round_up(this->decimal_point)) { in round_to_integer_type()
383 uint8_t *get_digits() { return this->digits; } in get_digits()
384 uint32_t get_num_digits() { return this->num_digits; } in get_num_digits()
385 int32_t get_decimal_point() { return this->decimal_point; } in get_decimal_point()
386 void set_truncated(bool trunc) { this->truncated = trunc; } in set_truncated()