Home
last modified time | relevance | path

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

123

/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/number/
DPrecision.java378 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument
379 if (minFrac == 0 && maxFrac == 0) { in constructFraction()
381 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction()
383 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction()
386 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction()
407 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 2 /* && maxSig == -1 */) { in constructFractionSignificant()
410 returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig); in constructFractionSignificant()
425 int minFrac = increment.scale(); in constructIncrement() local
429 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement()
431 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement()
[all …]
DNumberPropertyMapper.java135 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 …]
DNumberSkeletonImpl.java1065 int minFrac = 0; in parseFractionStem() local
1069 minFrac++; in parseFractionStem()
1079 maxFrac = minFrac; in parseFractionStem()
1089 maxFrac = minFrac; in parseFractionStem()
1096 if (minFrac == 0) { in parseFractionStem()
1099 macros.precision = Precision.minFraction(minFrac); in parseFractionStem()
1102 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1106 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument
1107 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1112 appendMultiple(sb, '0', minFrac); in generateFractionStem()
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
DPrecision.java413 static FractionPrecision constructFraction(int minFrac, int maxFrac) { in constructFraction() argument
414 if (minFrac == 0 && maxFrac == 0) { in constructFraction()
416 } else if (minFrac == 2 && maxFrac == 2) { in constructFraction()
418 } else if (minFrac == 0 && maxFrac == 6) { in constructFraction()
421 return new FractionRounderImpl(minFrac, maxFrac); in constructFraction()
443 if (base.minFrac == 0 && base.maxFrac == 0 && minSig == 1 && maxSig == 2 && in constructFractionSignificant()
447 … returnValue = new FracSigRounderImpl(base.minFrac, base.maxFrac, minSig, maxSig, priority); in constructFractionSignificant()
462 int minFrac = increment.scale(); in constructIncrement() local
466 return new IncrementOneRounderImpl(increment, minFrac, maxFrac); in constructIncrement()
468 return new IncrementFiveRounderImpl(increment, minFrac, maxFrac); in constructIncrement()
[all …]
DNumberPropertyMapper.java134 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 …]
DNumberSkeletonImpl.java1125 int minFrac = 0; in parseFractionStem() local
1129 minFrac++; in parseFractionStem()
1139 maxFrac = minFrac; in parseFractionStem()
1149 maxFrac = minFrac; in parseFractionStem()
1156 if (minFrac == 0) { in parseFractionStem()
1159 macros.precision = Precision.minFraction(minFrac); in parseFractionStem()
1162 macros.precision = Precision.minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1166 private static void generateFractionStem(int minFrac, int maxFrac, StringBuilder sb) { in generateFractionStem() argument
1167 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1172 appendMultiple(sb, '0', minFrac); in generateFractionStem()
[all …]
/third_party/skia/third_party/externals/icu/source/i18n/
Dnumber_mapper.cpp91 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 …]
Dnumber_rounding.cpp76 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument
77 if (minFrac == 0) { in getDisplayMagnitudeFraction()
80 return -minFrac; in getDisplayMagnitudeFraction()
282 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction()
284 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction()
285 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction()
291 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument
293 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction()
328 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument
334 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructIncrement()
Dnumber_patternstring.cpp513 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()
Dnumber_skeletons.cpp1124 int32_t minFrac = 0; in parseFractionStem() local
1128 minFrac++; in parseFractionStem()
1138 maxFrac = minFrac; in parseFractionStem()
1148 maxFrac = minFrac; in parseFractionStem()
1157 if (minFrac == 0) { in parseFractionStem()
1160 macros.precision = Precision::minFraction(minFrac); in parseFractionStem()
1163 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1168 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument
1169 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1174 appendMultiple(sb, u'0', minFrac); in generateFractionStem()
[all …]
/third_party/icu/icu4c/source/i18n/
Dnumber_mapper.cpp91 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 …]
Dnumber_rounding.cpp76 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument
77 if (minFrac == 0) { in getDisplayMagnitudeFraction()
80 return -minFrac; in getDisplayMagnitudeFraction()
282 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction()
284 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction()
285 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction()
291 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument
293 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction()
328 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument
334 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructIncrement()
Dnumber_patternstring.cpp513 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()
Dnumber_skeletons.cpp1124 int32_t minFrac = 0; in parseFractionStem() local
1128 minFrac++; in parseFractionStem()
1138 maxFrac = minFrac; in parseFractionStem()
1148 maxFrac = minFrac; in parseFractionStem()
1157 if (minFrac == 0) { in parseFractionStem()
1160 macros.precision = Precision::minFraction(minFrac); in parseFractionStem()
1163 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1168 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument
1169 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1174 appendMultiple(sb, u'0', minFrac); in generateFractionStem()
[all …]
/third_party/node/deps/icu-small/source/i18n/
Dnumber_mapper.cpp91 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 …]
Dnumber_rounding.cpp79 int32_t getDisplayMagnitudeFraction(int minFrac) { in getDisplayMagnitudeFraction() argument
80 if (minFrac == 0) { in getDisplayMagnitudeFraction()
83 return -minFrac; in getDisplayMagnitudeFraction()
285 Precision IncrementPrecision::withMinFraction(int32_t minFrac) const { in withMinFraction()
287 if (minFrac >= 0 && minFrac <= kMaxIntFracSig) { in withMinFraction()
288 return constructIncrement(fUnion.increment.fIncrement, minFrac); in withMinFraction()
294 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument
296 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructFraction()
331 IncrementPrecision Precision::constructIncrement(double increment, int32_t minFrac) { in constructIncrement() argument
337 settings.fMinFrac = static_cast<digits_t>(minFrac); in constructIncrement()
Dnumber_skeletons.cpp1130 int32_t minFrac = 0; in parseFractionStem() local
1134 minFrac++; in parseFractionStem()
1144 maxFrac = minFrac; in parseFractionStem()
1154 maxFrac = minFrac; in parseFractionStem()
1163 if (minFrac == 0) { in parseFractionStem()
1166 macros.precision = Precision::minFraction(minFrac); in parseFractionStem()
1169 macros.precision = Precision::minMaxFraction(minFrac, maxFrac); in parseFractionStem()
1174 blueprint_helpers::generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UError… in generateFractionStem() argument
1175 if (minFrac == 0 && maxFrac == 0) { in generateFractionStem()
1180 appendMultiple(sb, u'0', minFrac); in generateFractionStem()
[all …]
Dnumber_patternstring.cpp558 int minInt, minFrac; in patternInfoToProperties() local
562 minFrac = uprv_max(1, positive.fractionNumerals); in patternInfoToProperties()
566 minFrac = 0; in patternInfoToProperties()
569 minFrac = positive.fractionNumerals; in patternInfoToProperties()
582 properties.minimumFractionDigits = minFrac; in patternInfoToProperties()
594 properties.minimumFractionDigits = minFrac; in patternInfoToProperties()
729 int32_t minFrac = uprv_max(0, uprv_min(properties.minimumFractionDigits, dosMax)); in propertiesToPatternString() local
783 while (-digitsStringScale < minFrac) { in propertiesToPatternString()
/third_party/flutter/skia/third_party/externals/icu/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()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/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()
/third_party/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()
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/impl/number/
DDecimalQuantity_SimpleStorage.java349 public void setMinFraction(int minFrac) {
351 minFrac = Math.max(0, minFrac);
355 rReqPos = -minFrac;

123