Lines Matching refs:digits
50 * This is the zero digit. The base for the digits returned by getDigit()
75 fContext.digits = fStorage.getCapacity();
112 // Always reset the fContext.digits, even if fDecNumber was not reallocated,
114 fContext.digits = fStorage.getCapacity();
146 c.digits = 1;
162 int32_t savedDigits = fContext.digits;
163 fContext.digits = 1;
165 fContext.digits = savedDigits;
179 // Reduce - remove trailing zero digits.
187 // trim - remove trailing fraction zero digits.
194 // Resets the digit list; sets all the digits to zero.
210 * @return the number of digits written, not including the sign.
297 int32_t adjustedDigits = fDecNumber->digits;
312 return fDecNumber->exponent + fDecNumber->digits;
317 U_ASSERT(c <= fContext.digits);
324 fDecNumber->digits = c;
332 // zero digits. It's bogus, decimalFormatter parsing needs to be cleaned up.
335 return fDecNumber->digits;
341 int32_t count = fDecNumber->digits;
351 int32_t count = fDecNumber->digits;
359 int32_t count = fDecNumber->digits;
369 // the digits are stored least significant first, which requires moving all
370 // existing digits down one to make space for the new one to be appended.
376 // Ignore digits which exceed the precision we can represent
383 fDecNumber->digits = 1;
386 int32_t nDigits = fDecNumber->digits;
387 if (nDigits < fContext.digits) {
393 fDecNumber->digits++;
395 // digits. With decNumber's decimal being after the
455 // the max number of extra characters beyond the number of digits
457 // for the additional digits we retain.
466 // TODO: how many extra digits should be included for an accurate conversion?
499 if (fDecNumber->digits + fDecNumber->exponent > 10) {
527 // Range of in64_t is -9223372036854775808 to 9223372036854775807 (19 digits)
529 if (fDecNumber->digits + fDecNumber->exponent > 19) {
534 // The number of integer digits may differ from the number of digits stored
536 // for 12.345 numIntDigits = 2, number->digits = 5
537 // for 12E4 numIntDigits = 6, number->digits = 2
538 // The conversion ignores the fraction digits in the first case,
539 // and fakes up extra zero digits in the second.
541 // instead of looping over zero digits, multiplying each time.
543 int32_t numIntDigits = fDecNumber->digits + fDecNumber->exponent;
546 // Loop is iterating over digits starting with the most significant.
548 int32_t digitIndex = fDecNumber->digits - i - 1;
584 // than the number of digits. So says the decNumber library doc.
585 int32_t maxLength = fDecNumber->digits + 14;
610 // Number contains fraction digits.
618 if (fDecNumber->digits + fDecNumber->exponent < 10) {
619 // The number is 9 or fewer digits.
657 // Number contains fraction digits.
665 if (fDecNumber->digits + fDecNumber->exponent < 19) {
666 // The number is 18 or fewer digits.
766 // Figure out a max number of digits to use during the conversion, and
769 if (numDigits > fContext.digits) {
770 // fContext.digits == fStorage.getCapacity()
777 fContext.digits = numDigits;
834 * In practice, for formatting, multiply is by 10, 100 or 1000, so more digits
840 int32_t requiredDigits = this->digits() + other.digits();
841 if (requiredDigits > fContext.digits) {
843 int32_t requiredDigits = this->digits() + other.digits();
856 * could add a few digits, e.g. .25, but not expand arbitrarily.
871 * amount. Never reduce it. Available size is kept in fContext.digits.
885 // At 999,999,999 max digits, exceeding the limit is not too likely!
888 if (requestedCapacity > fContext.digits) {
894 fContext.digits = requestedCapacity;
902 * Round the representation to the given number of digits.
903 * @param maximumDigits The maximum number of digits to be shown.
909 int32_t savedDigits = fContext.digits;
910 fContext.digits = maximumDigits;
912 fContext.digits = savedDigits;
925 uprv_decNumberZero(&scale); // fraction digits.