Lines Matching refs:digits

833     // TODO Add debug stuff for significant digits here
966 DigitList digits;
967 digits.set(number);
968 return _format(digits, appendTo, handler, status);
1012 DigitList digits;
1013 digits.set(number);
1014 _format(digits, appendTo, handler, status);
1136 // Fixed point format. Round to a set number of fraction digits.
1162 * @param pos the number of integer digits to the right of
1184 * be filled in with the correct digits.
1189 DigitList& digits,
1193 // DigitList returns digits as '0' thru '9', so we will need to
1225 double doubleValue = digits.getDouble();
1226 int32_t prefixLen = appendAffix(appendTo, doubleValue, handler, !digits.isPositive(), TRUE);
1252 // Minimum integer digits are handled in exponential format by
1254 // integer digits is "123.4E-4".
1256 // Maximum integer digits are interpreted as indicating the
1259 // example, 0.01234 with 3 maximum integer digits is "12.34e-3".
1260 // If maximum integer digits are defined and are larger than
1261 // minimum integer digits, then minimum integer digits are
1263 digits.reduce(); // Removes trailing zero digits.
1264 int32_t exponent = digits.getDecimalAt();
1271 // No exponent increment is defined; use minimum integer digits.
1277 // We now output a minimum number of digits, and more if there
1278 // are more digits, up to the maximum number of digits. We
1279 // place the decimal point after the "integer" digits, which
1280 // are the first (decimalAt - exponent) digits.
1282 // The number of integer digits is handled specially if the number
1283 // is zero, since then there may be no digits.
1284 int32_t integerDigits = digits.isZero() ? minIntDig :
1285 digits.getDecimalAt() - exponent;
1286 int32_t totalDigits = digits.getCount();
1292 // totalDigits records total number of digits needs to be processed
1307 UChar32 c = (UChar32)((i < digits.getCount()) ?
1308 localizedDigits[digits.getDigitValue(i)] :
1323 // exponent digits. There is no maximum limit to the exponent
1324 // digits, since truncating the exponent would appendTo in an
1334 if (digits.isZero())
1381 // number of integer digits we will display, including both
1383 // and actual digits present in the number.
1385 _max(1, digits.getDecimalAt()) : minIntDig;
1386 if (digits.getDecimalAt() > 0 && count < digits.getDecimalAt()) {
1387 count = digits.getDecimalAt();
1391 // than the real number of integer digits. If this is so, we
1392 // output the least significant max integer digits. For example,
1393 // the value 1997 printed with 2 max integer digits is just "97".
1398 digitIndex = digits.getDecimalAt() - count;
1406 if (i < digits.getDecimalAt() && digitIndex < digits.getCount() &&
1409 appendTo += (UChar32)localizedDigits[digits.getDigitValue(digitIndex++)];
1436 // digits. If we've used up the digits we know there aren't.
1437 UBool fractionPresent = (!isInteger && digitIndex < digits.getCount()) ||
1441 // integer digits, then print a zero. Otherwise we won't print
1442 // _any_ digits, and we won't be able to parse this string.
1460 (sigCount >= minSigDig && digitIndex == digits.getCount()))) {
1466 // if we've output the maximum fraction digits
1468 // stop when we've output the minimum digits and
1471 // significant digits.
1473 (isInteger || digitIndex >= digits.getCount())) {
1479 // significant digits. These are only output if
1481 if (-1-i > (digits.getDecimalAt()-1)) {
1487 // zero if we don't. We don't want to output noise digits.
1488 if (!isInteger && digitIndex < digits.getCount()) {
1489 appendTo += (UChar32)localizedDigits[digits.getDigitValue(digitIndex++)];
1495 // digits, or if we output all the real digits and
1500 (digitIndex == digits.getCount() && sigCount >= minSigDig))) {
1508 int32_t suffixLen = appendAffix(appendTo, doubleValue, handler, !digits.isPositive(), FALSE);
1634 DigitList *digits = new DigitList;
1635 if (digits == NULL) {
1640 if (!parseForCurrency(text, parsePosition, *digits,
1642 delete digits;
1650 parsePosition, *digits, status, currency)) {
1652 delete digits;
1660 result.setDouble(digits->isPositive() ? inf : -inf);
1661 delete digits; // TODO: set the dl to infinity, and let it fall into the code below.
1668 digits->div(*fMultiplier, ec);
1674 if (digits->isZero() && !digits->isPositive() && isParseIntegerOnly()) {
1675 digits->setPositive(TRUE);
1677 result.adoptDigitList(digits);
1693 DigitList& digits,
1726 digits = tmpDigitList;
1755 digits = tmpDigitList;
1788 digits = tmpDigitList_2;
1819 * @param digits the DigitList to set to the parsed value.
1835 DigitList& digits, UBool* status,
1843 digits.setToZero();
1884 // process digits or Inf, find decimal position
1894 // We now have a string of digits, possibly with grouping symbols,
1898 // put only significant digits into the DigitList, and adjust the
1951 // We have to track digitCount ourselves, because digits.fCount will
1952 // pin when the maximum allowable digits is reached.
1977 // As a last resort, look through the localized digits if the zero digit
2211 digits.set(parsedNum.toStringPiece(), err);
3062 * Return the minimum exponent digits that will be shown.
3063 * @return the minimum exponent digits that will be shown
3075 * Set the minimum exponent digits that will be shown. This has no
3077 * @param minExpDig a value >= 1 indicating the fewest exponent digits
3996 // Process the digits, decimal, and grouping characters. We
3997 // record five pieces of information. We expect the digits
3999 // number of left digits, zero (central) digits, and right
4000 // digits. The position of the last grouping character is
4003 // if any (should be in the zero digits). If there is no
4004 // decimal point, then there should be no right digits.
4281 * Having a zeroDigitCount of zero yields a minimum integer digits
4297 // Do syntax checking on the digits, decimal points, and quotes.
4560 * Sets the maximum number of digits allowed in the integer portion of a
4569 * Sets the minimum number of digits allowed in the integer portion of a
4578 * Sets the maximum number of digits allowed in the fraction portion of a
4587 * Sets the minimum number of digits allowed in the fraction portion of a
4636 // locale, and adjust the decimal digits and rounding for the
4702 * Return the number of fraction digits to display, or the total
4703 * number of digits for significant digit formats and exponential