• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/ICU-511.35/icuSources/i18n/

Lines Matching defs:digits

908     // TODO Add debug stuff for significant digits here
1160 // get any remaining digits
1172 int32_t destlength = length<=maxIntDig?length:maxIntDig; // dest length pinned to max int digits
1190 (length-destlength), // skip any leading digits
1209 DigitList digits;
1210 digits.set(number);
1211 return _format(digits, appendTo, handler, status);
1269 DigitList digits;
1270 digits.set(number);
1271 _format(digits, appendTo, handler, status);
1289 if(len>0&&len<10) { /* 10 or more digits may not be an int64 */
1437 // Fixed point format. Round to a set number of fraction digits.
1508 * @param pos the number of integer digits to the right of
1530 * be filled in with the correct digits.
1535 DigitList& digits,
1540 // DigitList returns digits as '0' thru '9', so we will need to
1572 double doubleValue = digits.getDouble();
1573 int32_t prefixLen = appendAffix(appendTo, doubleValue, handler, !digits.isPositive(), TRUE);
1599 // Minimum integer digits are handled in exponential format by
1601 // integer digits is "123.4E-4".
1603 // Maximum integer digits are interpreted as indicating the
1606 // example, 0.01234 with 3 maximum integer digits is "12.34e-3".
1607 // If maximum integer digits are defined and are larger than
1608 // minimum integer digits, then minimum integer digits are
1610 digits.reduce(); // Removes trailing zero digits.
1611 int32_t exponent = digits.getDecimalAt();
1618 // No exponent increment is defined; use minimum integer digits.
1624 // We now output a minimum number of digits, and more if there
1625 // are more digits, up to the maximum number of digits. We
1626 // place the decimal point after the "integer" digits, which
1627 // are the first (decimalAt - exponent) digits.
1629 // The number of integer digits is handled specially if the number
1630 // is zero, since then there may be no digits.
1631 int32_t integerDigits = digits.isZero() ? minIntDig :
1632 digits.getDecimalAt() - exponent;
1633 int32_t totalDigits = digits.getCount();
1639 // totalDigits records total number of digits needs to be processed
1654 UChar32 c = (UChar32)((i < digits.getCount()) ?
1655 localizedDigits[digits.getDigitValue(i)] :
1670 // exponent digits. There is no maximum limit to the exponent
1671 // digits, since truncating the exponent would appendTo in an
1681 if (digits.isZero())
1728 // number of integer digits we will display, including both
1730 // and actual digits present in the number.
1732 _max(1, digits.getDecimalAt()) : minIntDig;
1733 if (digits.getDecimalAt() > 0 && count < digits.getDecimalAt()) {
1734 count = digits.getDecimalAt();
1738 // than the real number of integer digits. If this is so, we
1739 // output the least significant max integer digits. For example,
1740 // the value 1997 printed with 2 max integer digits is just "97".
1745 digitIndex = digits.getDecimalAt() - count;
1756 if (i < digits.getDecimalAt() && digitIndex < digits.getCount() &&
1759 appendTo += (UChar32)localizedDigits[digits.getDigitValue(digitIndex++)];
1786 // digits. If we've used up the digits we know there aren't.
1787 UBool fractionPresent = (!isInteger && digitIndex < digits.getCount()) ||
1791 // integer digits, then print a zero. Otherwise we won't print
1792 // _any_ digits, and we won't be able to parse this string.
1810 (sigCount >= minSigDig && digitIndex == digits.getCount()))) {
1816 // if we've output the maximum fraction digits
1818 // stop when we've output the minimum digits and
1821 // significant digits.
1823 (isInteger || digitIndex >= digits.getCount())) {
1829 // significant digits. These are only output if
1831 if (-1-i > (digits.getDecimalAt()-1)) {
1837 // zero if we don't. We don't want to output noise digits.
1838 if (!isInteger && digitIndex < digits.getCount()) {
1839 appendTo += (UChar32)localizedDigits[digits.getDigitValue(digitIndex++)];
1845 // digits, or if we output all the real digits and
1850 (digitIndex == digits.getCount() && sigCount >= minSigDig))) {
1858 int32_t suffixLen = appendAffix(appendTo, doubleValue, handler, !digits.isPositive(), FALSE);
1996 DigitList *digits = result.getInternalDigitList(); // get one from the stack buffer
1997 if (digits == NULL) {
2002 if (!parseForCurrency(text, parsePosition, *digits,
2011 parsePosition, *digits, status, currency)) {
2021 result.setDouble(digits->isPositive() ? inf : -inf);
2029 digits->div(*fMultiplier, ec);
2038 digits->div(ten,ec);
2043 digits->mult(ten,ec);
2051 if (digits->isZero() && !digits->isPositive() && isParseIntegerOnly()) {
2052 digits->setPositive(TRUE);
2054 result.adoptDigitList(digits);
2063 DigitList& digits,
2096 digits = tmpDigitList;
2125 digits = tmpDigitList;
2158 digits = tmpDigitList_2;
2189 * @param digits the DigitList to set to the parsed value.
2205 DigitList& digits, UBool* status,
2213 digits.setToZero();
2393 // process digits or Inf, find decimal position
2403 // We now have a string of digits, possibly with grouping symbols,
2407 // put only significant digits into the DigitList, and adjust the
2454 // We have to track digitCount ourselves, because digits.fCount will
2455 // pin when the maximum allowable digits is reached.
2480 // As a last resort, look through the localized digits if the zero digit
2485 // if \u3007 is treated as 0 for parsing, \u96F6 should be too. Otherwise check for nonzero digits.
2754 digits.set(parsedNum.toStringPiece(),
3659 * Return the minimum exponent digits that will be shown.
3660 * @return the minimum exponent digits that will be shown
3672 * Set the minimum exponent digits that will be shown. This has no
3674 * @param minExpDig a value >= 1 indicating the fewest exponent digits
4608 // Process the digits, decimal, and grouping characters. We
4609 // record five pieces of information. We expect the digits
4611 // number of left digits, zero (central) digits, and right
4612 // digits. The position of the last grouping character is
4615 // if any (should be in the zero digits). If there is no
4616 // decimal point, then there should be no right digits.
4893 * Having a zeroDigitCount of zero yields a minimum integer digits
4909 // Do syntax checking on the digits, decimal points, and quotes.
5176 * Sets the maximum number of digits allowed in the integer portion of a
5188 * Sets the minimum number of digits allowed in the integer portion of a
5200 * Sets the maximum number of digits allowed in the fraction portion of a
5212 * Sets the minimum number of digits allowed in the fraction portion of a
5273 // locale, and adjust the decimal digits and rounding for the
5348 * Return the number of fraction digits to display, or the total
5349 * number of digits for significant digit formats and exponential