Home
last modified time | relevance | path

Searched refs:minFrac (Results 1 – 25 of 28) sorted by relevance

12

/external/icu/android_icu4j/src/main/java/android/icu/number/
DNumberPropertyMapper.java140 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 …]
DPrecision.java447 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument
448 if (minFrac == 0 && maxFrac == 0) { in constructFraction()
450 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction()
452 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction()
455 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction()
475 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant()
478 return new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant()
605 final int minFrac; field in Precision.FractionRounderImpl
608 public FractionRounderImpl(int minFrac, int maxFrac) { in FractionRounderImpl() argument
609 this.minFrac = minFrac; in FractionRounderImpl()
[all …]
DNumberSkeletonImpl.java985 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/
DNumberPropertyMapper.java139 int minFrac = properties.getMinimumFractionDigits(); in oldToNew() local
144 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew()
150 if (minFrac == -1 && maxFrac == -1) { in oldToNew()
151 minFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew()
153 } else if (minFrac == -1) { in oldToNew()
154 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
156 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
166 minFrac = minFrac <= 0 ? 1 : minFrac; in oldToNew()
167 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
172 minFrac = minFrac < 0 ? 0 : minFrac; in oldToNew()
[all …]
DPrecision.java459 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument
460 if (minFrac == 0 && maxFrac == 0) { in constructFraction()
462 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction()
464 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction()
467 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction()
487 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant()
490 return new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant()
617 final int minFrac; field in Precision.FractionRounderImpl
620 public FractionRounderImpl(int minFrac, int maxFrac) { in FractionRounderImpl() argument
621 this.minFrac = minFrac; in FractionRounderImpl()
[all …]
DNumberSkeletonImpl.java984 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/
Dnumber_mapper.cpp101 int32_t minFrac = properties.minimumFractionDigits; in oldToNew() local
106 bool explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew()
112 if (useCurrency && (minFrac == -1 || maxFrac == -1)) { in oldToNew()
115 if (minFrac == -1 && maxFrac == -1) { in oldToNew()
116 minFrac = digits; in oldToNew()
118 } else if (minFrac == -1) { in oldToNew()
119 minFrac = std::min(maxFrac, digits); in oldToNew()
121 maxFrac = std::max(minFrac, digits); in oldToNew()
129 minFrac = minFrac <= 0 ? 1 : minFrac; in oldToNew()
130 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
[all …]
Dnumber_rounding.cpp40 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument
41 if (minFrac == 0) { in getDisplayMagnitudeFraction()
44 return -minFrac; in getDisplayMagnitudeFraction()
214 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction()
216 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction()
217 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction()
223 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument
225 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction()
255 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument
258 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructIncrement()
Dnumber_patternstring.cpp512 int minInt, minFrac; in patternInfoToProperties() local
516 minFrac = uprv_max(1, positive.fractionNumerals); in patternInfoToProperties()
520 minFrac = 0; in patternInfoToProperties()
523 minFrac = positive.fractionNumerals; in patternInfoToProperties()
536 properties.minimumFractionDigits = minFrac; in patternInfoToProperties()
548 properties.minimumFractionDigits = minFrac; in patternInfoToProperties()
660 int minFrac = uprv_max(uprv_min(properties.minimumFractionDigits, dosMax), 0); in propertiesToPatternString() local
736 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
Dnumber_skeletons.cpp963 int32_t minFrac = 0; in parseFractionStem() local
967 minFrac++; in parseFractionStem()
977 maxFrac = minFrac; in parseFractionStem()
987 maxFrac = minFrac; in parseFractionStem()
996 macros.precision = Precision::minFraction(minFrac); in parseFractionStem()
998 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1003 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument
1004 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1009 appendMultiple(sb, u'0', minFrac); in generateFractionStem()
1013 appendMultiple(sb, u'#', maxFrac - minFrac); in generateFractionStem()
Dnumber_decimalquantity.cpp153 void DecimalQuantity::setFractionLength(int32_t minFrac, int32_t maxFrac) { in setFractionLength() argument
155 U_ASSERT(minFrac >= 0); in setFractionLength()
156 U_ASSERT(maxFrac >= minFrac); in setFractionLength()
160 rReqPos = -minFrac; in setFractionLength()
Dnumber_decimalquantity.h71 void setFractionLength(int32_t minFrac, int32_t maxFrac);
Dnumber_skeletons.h230 void generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode& status);
Ddecimfmt.cpp1321 int32_t minFrac = fields->exportedProperties->minimumFractionDigits; in setupFastFormat() local
1322 if (minFrac > 0) { in setupFastFormat()
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DPatternStringParser.java574 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()
DDecimalQuantity_AbstractBCD.java158 public void setFractionLength(int minFrac, int maxFrac) { in setFractionLength() argument
160 assert minFrac >= 0; in setFractionLength() local
161 assert maxFrac >= minFrac; in setFractionLength() local
165 rReqPos = -minFrac; in setFractionLength()
DDecimalQuantity.java49 public void setFractionLength(int minFrac, int maxFrac); in setFractionLength() argument
DPatternStringUtils.java42 int minFrac = Math.max(Math.min(properties.getMinimumFractionDigits(), dosMax), 0); in propertiesToPatternString() local
115 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DPatternStringParser.java580 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()
DDecimalQuantity_AbstractBCD.java160 public void setFractionLength(int minFrac, int maxFrac) { in setFractionLength() argument
162 assert minFrac >= 0; in setFractionLength() local
163 assert maxFrac >= minFrac; in setFractionLength() local
167 rReqPos = -minFrac; in setFractionLength()
DDecimalQuantity.java51 public void setFractionLength(int minFrac, int maxFrac); in setFractionLength() argument
DPatternStringUtils.java44 int minFrac = Math.max(Math.min(properties.getMinimumFractionDigits(), dosMax), 0); in propertiesToPatternString() local
117 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/impl/number/
DDecimalQuantity_SimpleStorage.java342 public void setFractionLength(int minFrac, int maxFrac) {
344 minFrac = Math.max(0, minFrac);
348 if (maxFrac < minFrac) {
349 minFrac = maxFrac;
354 rReqPos = -minFrac;
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/impl/number/
DDecimalQuantity_SimpleStorage.java339 public void setFractionLength(int minFrac, int maxFrac) {
341 minFrac = Math.max(0, minFrac);
345 if (maxFrac < minFrac) {
346 minFrac = maxFrac;
351 rReqPos = -minFrac;
/external/icu/icu4c/source/i18n/unicode/
Dnumberformatter.h780 static FractionPrecision constructFraction(int32_t minFrac, int32_t maxFrac);
787 static IncrementPrecision constructIncrement(double increment, int32_t minFrac);
935 Precision withMinFraction(int32_t minFrac) const;

12