/external/icu/android_icu4j/src/main/java/android/icu/number/ |
D | Precision.java | 379 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument 380 if (minFrac == 0 && maxFrac == 0) { in constructFraction() 382 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction() 384 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction() 387 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction() 408 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant() 411 returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant() 426 int minFrac = increment.scale(); in constructIncrement() local 430 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement() 432 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement() [all …]
|
D | NumberPropertyMapper.java | 141 int minFrac = properties.getMinimumFractionDigits(); in oldToNew() local 146 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 152 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 153 minFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 155 } else if (minFrac == -1) { in oldToNew() 156 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 158 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 168 minFrac = minFrac <= 0 ? 1 : minFrac; in oldToNew() 169 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 174 minFrac = minFrac < 0 ? 0 : minFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 985 int minFrac = 0; in parseFractionStem() local 989 minFrac++; in parseFractionStem() 999 maxFrac = minFrac; in parseFractionStem() 1009 maxFrac = minFrac; in parseFractionStem() 1016 macros.precision = Precision.minFraction(minFrac); in parseFractionStem() 1018 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1022 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument 1023 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1028 appendMultiple(sb, '0', minFrac); in generateFractionStem() 1032 appendMultiple(sb, '#', maxFrac - minFrac); in generateFractionStem() [all …]
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/ |
D | Precision.java | 391 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument 392 if (minFrac == 0 && maxFrac == 0) { in constructFraction() 394 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction() 396 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction() 399 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction() 420 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant() 423 returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant() 438 int minFrac = increment.scale(); in constructIncrement() local 442 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement() 444 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement() [all …]
|
D | NumberPropertyMapper.java | 140 int minFrac = properties.getMinimumFractionDigits(); in oldToNew() local 145 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 151 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 152 minFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 154 } else if (minFrac == -1) { in oldToNew() 155 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 157 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 167 minFrac = minFrac <= 0 ? 1 : minFrac; in oldToNew() 168 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 173 minFrac = minFrac < 0 ? 0 : minFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 984 int minFrac = 0; in parseFractionStem() local 988 minFrac++; in parseFractionStem() 998 maxFrac = minFrac; in parseFractionStem() 1008 maxFrac = minFrac; in parseFractionStem() 1015 macros.precision = Precision.minFraction(minFrac); in parseFractionStem() 1017 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1021 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument 1022 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1027 appendMultiple(sb, '0', minFrac); in generateFractionStem() 1031 appendMultiple(sb, '#', maxFrac - minFrac); in generateFractionStem() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | number_mapper.cpp | 103 int32_t minFrac = properties.minimumFractionDigits; in oldToNew() local 108 bool explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 114 if (useCurrency && (minFrac == -1 || maxFrac == -1)) { in oldToNew() 117 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 118 minFrac = digits; in oldToNew() 120 } else if (minFrac == -1) { in oldToNew() 121 minFrac = std::min(maxFrac, digits); in oldToNew() 123 maxFrac = std::max(minFrac, digits); in oldToNew() 131 minFrac = minFrac <= 0 ? 1 : minFrac; in oldToNew() 132 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() [all …]
|
D | number_rounding.cpp | 40 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument 41 if (minFrac == 0) { in getDisplayMagnitudeFraction() 44 return -minFrac; in getDisplayMagnitudeFraction() 215 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction() 217 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction() 218 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction() 224 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument 226 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction() 256 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument 262 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 | 997 int32_t minFrac = 0; in parseFractionStem() local 1001 minFrac++; in parseFractionStem() 1011 maxFrac = minFrac; in parseFractionStem() 1021 maxFrac = minFrac; in parseFractionStem() 1030 macros.precision = Precision::minFraction(minFrac); in parseFractionStem() 1032 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem() 1037 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument 1038 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem() 1043 appendMultiple(sb, u'0', minFrac); in generateFractionStem() 1047 appendMultiple(sb, u'#', maxFrac - minFrac); in generateFractionStem()
|
D | number_decimalquantity.h | 69 void setMinFraction(int32_t minFrac);
|
D | number_skeletons.h | 231 void generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode& status);
|
D | number_decimalquantity.cpp | 146 void DecimalQuantity::setMinFraction(int32_t minFrac) { in setMinFraction() argument 148 U_ASSERT(minFrac >= 0); in setMinFraction() 152 rReqPos = -minFrac; in setMinFraction()
|
/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 | 45 public void setMinFraction(int minFrac); in setMinFraction() argument
|
D | DecimalQuantity_AbstractBCD.java | 126 public void setMinFraction(int minFrac) { in setMinFraction() argument 128 assert minFrac >= 0; in setMinFraction() local 132 rReqPos = -minFrac; in setMinFraction()
|
D | PatternStringUtils.java | 76 int minFrac = Math.max(0, Math.min(properties.getMinimumFractionDigits(), dosMax)); in propertiesToPatternString() local 125 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 | 47 public void setMinFraction(int minFrac); in setMinFraction() argument
|
D | DecimalQuantity_AbstractBCD.java | 128 public void setMinFraction(int minFrac) { in setMinFraction() argument 130 assert minFrac >= 0; in setMinFraction() local 134 rReqPos = -minFrac; in setMinFraction()
|
D | PatternStringUtils.java | 78 int minFrac = Math.max(0, Math.min(properties.getMinimumFractionDigits(), dosMax)); in propertiesToPatternString() local 127 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/impl/number/ |
D | DecimalQuantity_SimpleStorage.java | 332 public void setMinFraction(int minFrac) { 334 minFrac = Math.max(0, minFrac); 338 rReqPos = -minFrac;
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/impl/number/ |
D | DecimalQuantity_SimpleStorage.java | 335 public void setMinFraction(int minFrac) { 337 minFrac = Math.max(0, minFrac); 341 rReqPos = -minFrac;
|
/external/icu/icu4c/source/i18n/unicode/ |
D | numberformatter.h | 734 static FractionPrecision constructFraction(int32_t minFrac, int32_t maxFrac); 741 static IncrementPrecision constructIncrement(double increment, int32_t minFrac); 889 Precision withMinFraction(int32_t minFrac) const;
|
/external/icu/icu4c/source/test/cintltst/ |
D | cnumtst.c | 3260 int32_t minFrac; member 3339 unum_setAttribute(unf, UNUM_MIN_FRACTION_DIGITS, itemPtr->minFrac); in TestSetMaxFracAndRoundIncr() 3350 int32_t minFrac = unum_getAttribute(unf, UNUM_MIN_FRACTION_DIGITS); in TestSetMaxFracAndRoundIncr() local 3351 if (minFrac != itemPtr->minFrac) { in TestSetMaxFracAndRoundIncr() 3353 itemPtr->descrip, itemPtr->minFrac, minFrac); in TestSetMaxFracAndRoundIncr() 3358 int32_t expMaxFrac = (roundIncrUsed)? itemPtr->minFrac: itemPtr->maxFrac; in TestSetMaxFracAndRoundIncr()
|