/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/ |
D | Precision.java | 396 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument 397 if (minFrac == 0 && maxFrac == 0) { in constructFraction() 399 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction() 401 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction() 404 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction() 425 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant() 428 returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant() 443 int minFrac = increment.scale(); in constructIncrement() local 447 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement() 449 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement() [all …]
|
D | NumberPropertyMapper.java | 134 int minFrac = properties.getMinimumFractionDigits(); in oldToNew() local 139 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 145 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 146 minFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 148 } else if (minFrac == -1) { in oldToNew() 149 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 151 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 159 minFrac = (minFrac < 0 || (minFrac == 0 && maxInt == 0)) ? 1 : minFrac; in oldToNew() 160 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 165 minFrac = minFrac < 0 ? 0 : minFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 1123 int minFrac = 0; in parseFractionStem() local 1127 minFrac++; in parseFractionStem() 1137 maxFrac = minFrac; in parseFractionStem() 1147 maxFrac = minFrac; in parseFractionStem() 1154 if (minFrac == 0) { in parseFractionStem() 1157 macros.precision = Precision.minFraction(minFrac); in parseFractionStem() 1160 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1164 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument 1165 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1170 appendMultiple(sb, '0', minFrac); in generateFractionStem() [all …]
|
/external/icu/android_icu4j/src/main/java/android/icu/number/ |
D | Precision.java | 384 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument 385 if (minFrac == 0 && maxFrac == 0) { in constructFraction() 387 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction() 389 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction() 392 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction() 413 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant() 416 returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant() 431 int minFrac = increment.scale(); in constructIncrement() local 435 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement() 437 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement() [all …]
|
D | NumberPropertyMapper.java | 135 int minFrac = properties.getMinimumFractionDigits(); in oldToNew() local 140 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 146 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 147 minFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 149 } else if (minFrac == -1) { in oldToNew() 150 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 152 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 160 minFrac = (minFrac < 0 || (minFrac == 0 && maxInt == 0)) ? 1 : minFrac; in oldToNew() 161 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 166 minFrac = minFrac < 0 ? 0 : minFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 1124 int minFrac = 0; in parseFractionStem() local 1128 minFrac++; in parseFractionStem() 1138 maxFrac = minFrac; in parseFractionStem() 1148 maxFrac = minFrac; in parseFractionStem() 1155 if (minFrac == 0) { in parseFractionStem() 1158 macros.precision = Precision.minFraction(minFrac); in parseFractionStem() 1161 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1165 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument 1166 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1171 appendMultiple(sb, '0', minFrac); in generateFractionStem() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | number_mapper.cpp | 91 int32_t minFrac = properties.minimumFractionDigits; in oldToNew() local 98 bool explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 104 if (useCurrency && (minFrac == -1 || maxFrac == -1)) { in oldToNew() 107 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 108 minFrac = digits; in oldToNew() 110 } else if (minFrac == -1) { in oldToNew() 111 minFrac = std::min(maxFrac, digits); in oldToNew() 113 maxFrac = std::max(minFrac, digits); in oldToNew() 119 minFrac = (minFrac < 0 || (minFrac == 0 && maxInt == 0)) ? 1 : minFrac; in oldToNew() 120 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() [all …]
|
D | number_rounding.cpp | 76 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument 77 if (minFrac == 0) { in getDisplayMagnitudeFraction() 80 return -minFrac; in getDisplayMagnitudeFraction() 251 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction() 253 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction() 254 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction() 260 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument 262 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction() 292 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument 298 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructIncrement()
|
D | number_patternstring.cpp | 513 int minInt, minFrac; in patternInfoToProperties() local 517 minFrac = uprv_max(1, positive.fractionNumerals); in patternInfoToProperties() 521 minFrac = 0; in patternInfoToProperties() 524 minFrac = positive.fractionNumerals; in patternInfoToProperties() 537 properties.minimumFractionDigits = minFrac; in patternInfoToProperties() 549 properties.minimumFractionDigits = minFrac; in patternInfoToProperties() 681 int32_t minFrac = uprv_max(0, uprv_min(properties.minimumFractionDigits, dosMax)); in propertiesToPatternString() local 735 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
|
D | number_skeletons.cpp | 1092 int32_t minFrac = 0; in parseFractionStem() local 1096 minFrac++; in parseFractionStem() 1106 maxFrac = minFrac; in parseFractionStem() 1116 maxFrac = minFrac; in parseFractionStem() 1125 if (minFrac == 0) { in parseFractionStem() 1128 macros.precision = Precision::minFraction(minFrac); in parseFractionStem() 1131 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1136 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument 1137 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1142 appendMultiple(sb, u'0', minFrac); in generateFractionStem() [all …]
|
D | number_decimalquantity.h | 69 void setMinFraction(int32_t minFrac);
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/ |
D | PatternStringParser.java | 574 int minInt, minFrac; in patternInfoToProperties() local 578 minFrac = Math.max(1, positive.fractionNumerals); in patternInfoToProperties() 582 minFrac = 0; in patternInfoToProperties() 585 minFrac = positive.fractionNumerals; in patternInfoToProperties() 599 properties.setMinimumFractionDigits(minFrac); in patternInfoToProperties() 612 properties.setMinimumFractionDigits(minFrac); in patternInfoToProperties()
|
D | DecimalQuantity.java | 46 public void setMinFraction(int minFrac); in setMinFraction() argument
|
D | DecimalQuantity_AbstractBCD.java | 134 public void setMinFraction(int minFrac) { in setMinFraction() argument 136 assert minFrac >= 0; in setMinFraction() local 140 rReqPos = -minFrac; in setMinFraction()
|
D | PatternStringUtils.java | 89 int minFrac = Math.max(0, Math.min(properties.getMinimumFractionDigits(), dosMax)); in propertiesToPatternString() local 138 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/ |
D | PatternStringParser.java | 580 int minInt, minFrac; in patternInfoToProperties() local 584 minFrac = Math.max(1, positive.fractionNumerals); in patternInfoToProperties() 588 minFrac = 0; in patternInfoToProperties() 591 minFrac = positive.fractionNumerals; in patternInfoToProperties() 605 properties.setMinimumFractionDigits(minFrac); in patternInfoToProperties() 618 properties.setMinimumFractionDigits(minFrac); in patternInfoToProperties()
|
D | DecimalQuantity.java | 48 public void setMinFraction(int minFrac); in setMinFraction() argument
|
D | DecimalQuantity_AbstractBCD.java | 136 public void setMinFraction(int minFrac) { in setMinFraction() argument 138 assert minFrac >= 0; in setMinFraction() local 142 rReqPos = -minFrac; in setMinFraction()
|
D | PatternStringUtils.java | 94 int minFrac = Math.max(0, Math.min(properties.getMinimumFractionDigits(), dosMax)); in propertiesToPatternString() local 143 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/impl/number/ |
D | DecimalQuantity_SimpleStorage.java | 342 public void setMinFraction(int minFrac) { 344 minFrac = Math.max(0, minFrac); 348 rReqPos = -minFrac;
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/impl/number/ |
D | DecimalQuantity_SimpleStorage.java | 339 public void setMinFraction(int minFrac) { 341 minFrac = Math.max(0, minFrac); 345 rReqPos = -minFrac;
|
/external/icu/icu4c/source/test/cintltst/ |
D | cnumtst.c | 3262 int32_t minFrac; member 3341 unum_setAttribute(unf, UNUM_MIN_FRACTION_DIGITS, itemPtr->minFrac); in TestSetMaxFracAndRoundIncr() 3352 int32_t minFrac = unum_getAttribute(unf, UNUM_MIN_FRACTION_DIGITS); in TestSetMaxFracAndRoundIncr() local 3353 if (minFrac != itemPtr->minFrac) { in TestSetMaxFracAndRoundIncr() 3355 itemPtr->descrip, itemPtr->minFrac, minFrac); in TestSetMaxFracAndRoundIncr() 3360 int32_t expMaxFrac = (roundIncrUsed)? itemPtr->minFrac: itemPtr->maxFrac; in TestSetMaxFracAndRoundIncr() 3488 int minInt, minFrac, ulen; in TestMinIntMinFracZero() local 3493 minFrac = unum_getAttribute(unum, UNUM_MIN_FRACTION_DIGITS); in TestMinIntMinFracZero() 3494 if (minInt != 0 || minFrac != 0) { in TestMinIntMinFracZero() 3495 log_err("after setting minInt=minFrac=0, get minInt %d, minFrac %d\n", minInt, minFrac); in TestMinIntMinFracZero() [all …]
|
/external/icu/libicu/cts_headers/ |
D | number_decimalquantity.h | 69 void setMinFraction(int32_t minFrac);
|
/external/icu/icu4c/source/i18n/unicode/ |
D | numberformatter.h | 740 static FractionPrecision constructFraction(int32_t minFrac, int32_t maxFrac); 747 static IncrementPrecision constructIncrement(double increment, int32_t minFrac); 896 Precision withMinFraction(int32_t minFrac) const;
|
/external/icu/libicu/cts_headers/unicode/ |
D | numberformatter.h | 740 static FractionPrecision constructFraction(int32_t minFrac, int32_t maxFrac); 747 static IncrementPrecision constructIncrement(double increment, int32_t minFrac); 896 Precision withMinFraction(int32_t minFrac) const;
|