Lines Matching refs:digits

53  * This is the zero digit.  The base for the digits returned by getDigit()
75 fContext.digits = fStorage.getCapacity();
113 // Always reset the fContext.digits, even if fDecNumber was not reallocated,
115 fContext.digits = fStorage.getCapacity();
136 c.digits = 1;
152 int32_t savedDigits = fContext.digits;
153 fContext.digits = 1;
155 fContext.digits = savedDigits;
169 // Reduce - remove trailing zero digits.
177 // trim - remove trailing fraction zero digits.
184 // Resets the digit list; sets all the digits to zero.
201 * @return the number of digits written, not including the sign.
288 int32_t adjustedDigits = fDecNumber->digits;
303 return fDecNumber->exponent + fDecNumber->digits;
308 U_ASSERT(c <= fContext.digits);
315 fDecNumber->digits = c;
323 // zero digits. It's bogus, decimalFormatter parsing needs to be cleaned up.
326 return fDecNumber->digits;
332 int32_t count = fDecNumber->digits;
342 int32_t count = fDecNumber->digits;
350 int32_t count = fDecNumber->digits;
360 // the digits are stored least significant first, which requires moving all
361 // existing digits down one to make space for the new one to be appended.
367 // Ignore digits which exceed the precision we can represent
374 fDecNumber->digits = 1;
377 int32_t nDigits = fDecNumber->digits;
378 if (nDigits < fContext.digits) {
384 fDecNumber->digits++;
386 // digits. With decNumber's decimal being after the
450 // the max number of extra characters beyond the number of digits
452 // for the additional digits we retain.
461 // TODO: how many extra digits should be included for an accurate conversion?
489 if (fDecNumber->digits + fDecNumber->exponent > 10) {
518 // Range of in64_t is -9223372036854775808 to 9223372036854775807 (19 digits)
520 if (fDecNumber->digits + fDecNumber->exponent > 19) {
525 // The number of integer digits may differ from the number of digits stored
527 // for 12.345 numIntDigits = 2, number->digits = 5
528 // for 12E4 numIntDigits = 6, number->digits = 2
529 // The conversion ignores the fraction digits in the first case,
530 // and fakes up extra zero digits in the second.
532 // instead of looping over zero digits, multiplying each time.
534 int32_t numIntDigits = fDecNumber->digits + fDecNumber->exponent;
537 // Loop is iterating over digits starting with the most significant.
539 int32_t digitIndex = fDecNumber->digits - i - 1;
575 // than the number of digits. So says the decNumber library doc.
576 int32_t maxLength = fDecNumber->digits + 14;
601 // Number contains fraction digits.
609 if (fDecNumber->digits + fDecNumber->exponent < 10) {
610 // The number is 9 or fewer digits.
648 // Number contains fraction digits.
656 if (fDecNumber->digits + fDecNumber->exponent < 19) {
657 // The number is 18 or fewer digits.
693 * @param maximumDigits The maximum digits to be generated. If zero,
694 * there is no maximum -- generate all digits.
724 // Figure out a max number of digits to use during the conversion, and
727 if (numDigits > fContext.digits) {
728 // fContext.digits == fStorage.getCapacity()
735 fContext.digits = numDigits;
773 * In practice, for formatting, multiply is by 10, 100 or 1000, so more digits
779 int32_t requiredDigits = this->digits() + other.digits();
780 if (requiredDigits > fContext.digits) {
782 int32_t requiredDigits = this->digits() + other.digits();
795 * could add a few digits, e.g. .25, but not expand arbitrarily.
810 * amount. Never reduce it. Available size is kept in fContext.digits.
824 // At 999,999,999 max digits, exceeding the limit is not too likely!
827 if (requestedCapacity > fContext.digits) {
833 fContext.digits = requestedCapacity;
841 * Round the representation to the given number of digits.
842 * @param maximumDigits The maximum number of digits to be shown.
848 int32_t savedDigits = fContext.digits;
849 fContext.digits = maximumDigits;
851 fContext.digits = savedDigits;
864 uprv_decNumberZero(&scale); // fraction digits.