Home
last modified time | relevance | path

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

12

/external/icu/android_icu4j/src/main/java/android/icu/number/
DNumberPropertyMapper.java139 int maxFrac = properties.getMaximumFractionDigits(); in oldToNew() local
145 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew()
151 if (minFrac == -1 && maxFrac == -1) { in oldToNew()
153 maxFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew()
155 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
156 } else if (maxFrac == -1) { in oldToNew()
157 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
165 if (minInt == 0 && maxFrac != 0) { in oldToNew()
168 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
174 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; 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()
606 final int maxFrac; field in Precision.FractionRounderImpl
608 public FractionRounderImpl(int minFrac, int maxFrac) { in FractionRounderImpl() argument
610 this.maxFrac = maxFrac; in FractionRounderImpl()
[all …]
DNumberSkeletonImpl.java986 int maxFrac; in parseFractionStem() local
996 maxFrac = -1; in parseFractionStem()
999 maxFrac = minFrac; in parseFractionStem()
1002 maxFrac++; in parseFractionStem()
1009 maxFrac = minFrac; in parseFractionStem()
1015 if (maxFrac == -1) { 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()
1029 if (maxFrac == -1) { in generateFractionStem()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/number/
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()
618 final int maxFrac; field in Precision.FractionRounderImpl
620 public FractionRounderImpl(int minFrac, int maxFrac) { in FractionRounderImpl() argument
622 this.maxFrac = maxFrac; in FractionRounderImpl()
[all …]
DNumberPropertyMapper.java138 int maxFrac = properties.getMaximumFractionDigits(); in oldToNew() local
144 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew()
150 if (minFrac == -1 && maxFrac == -1) { in oldToNew()
152 maxFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew()
154 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
155 } else if (maxFrac == -1) { in oldToNew()
156 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew()
164 if (minInt == 0 && maxFrac != 0) { in oldToNew()
167 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
173 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
[all …]
DNumberSkeletonImpl.java985 int maxFrac; in parseFractionStem() local
995 maxFrac = -1; in parseFractionStem()
998 maxFrac = minFrac; in parseFractionStem()
1001 maxFrac++; in parseFractionStem()
1008 maxFrac = minFrac; in parseFractionStem()
1014 if (maxFrac == -1) { 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()
1028 if (maxFrac == -1) { in generateFractionStem()
[all …]
/external/icu/icu4c/source/i18n/
Dnumber_mapper.cpp100 int32_t maxFrac = properties.maximumFractionDigits; 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()
117 maxFrac = digits; in oldToNew()
119 minFrac = std::min(maxFrac, digits); in oldToNew()
121 maxFrac = std::max(minFrac, digits); in oldToNew()
127 if (minInt == 0 && maxFrac != 0) { in oldToNew()
130 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
136 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew()
[all …]
Dnumber_rounding.cpp25 int32_t getRoundingMagnitudeFraction(int maxFrac) { in getRoundingMagnitudeFraction() argument
26 if (maxFrac == -1) { in getRoundingMagnitudeFraction()
29 return -maxFrac; in getRoundingMagnitudeFraction()
223 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument
226 settings.fMaxFrac = static_cast<digits_t>(maxFrac); in constructFraction()
Dnumber_skeletons.cpp964 int32_t maxFrac; in parseFractionStem() local
974 maxFrac = -1; in parseFractionStem()
977 maxFrac = minFrac; in parseFractionStem()
980 maxFrac++; in parseFractionStem()
987 maxFrac = minFrac; in parseFractionStem()
995 if (maxFrac == -1) { 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()
1010 if (maxFrac == -1) { in generateFractionStem()
[all …]
Dnumber_decimalquantity.h71 void setFractionLength(int32_t minFrac, int32_t maxFrac);
82 int32_t maxFrac, UErrorCode& status);
Dnumber_decimalquantity.cpp153 void DecimalQuantity::setFractionLength(int32_t minFrac, int32_t maxFrac) { in setFractionLength() argument
156 U_ASSERT(maxFrac >= minFrac); in setFractionLength()
161 rOptPos = -maxFrac; in setFractionLength()
174 int32_t maxFrac, UErrorCode& status) { in roundToIncrement() argument
190 roundToMagnitude(-maxFrac, roundingMode, status); in roundToIncrement()
Dnumber_patternstring.cpp661 int maxFrac = uprv_min(properties.maximumFractionDigits, dosMax); in propertiesToPatternString() local
744 int mN = (maxFrac != dosMax) ? uprv_min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
Dnumber_skeletons.h230 void generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode& status);
/external/icu/android_icu4j/src/main/tests/android/icu/dev/impl/number/
DDecimalQuantity_SimpleStorage.java342 public void setFractionLength(int minFrac, int maxFrac) {
345 maxFrac = Math.max(0, maxFrac);
348 if (maxFrac < minFrac) {
349 minFrac = maxFrac;
355 rOptPos = -maxFrac;
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/impl/number/
DDecimalQuantity_SimpleStorage.java339 public void setFractionLength(int minFrac, int maxFrac) {
342 maxFrac = Math.max(0, maxFrac);
345 if (maxFrac < minFrac) {
346 minFrac = maxFrac;
352 rOptPos = -maxFrac;
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DPatternStringUtils.java43 int maxFrac = Math.min(properties.getMaximumFractionDigits(), dosMax); in propertiesToPatternString() local
123 int mN = (maxFrac != dosMax) ? Math.min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
DDecimalQuantity.java49 public void setFractionLength(int minFrac, int maxFrac); in setFractionLength() argument
DDecimalQuantity_AbstractBCD.java158 public void setFractionLength(int minFrac, int maxFrac) { in setFractionLength() argument
161 assert maxFrac >= minFrac; in setFractionLength()
166 rOptPos = -maxFrac; in setFractionLength()
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/
DPatternStringUtils.java45 int maxFrac = Math.min(properties.getMaximumFractionDigits(), dosMax); in propertiesToPatternString() local
125 int mN = (maxFrac != dosMax) ? Math.min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
DDecimalQuantity.java51 public void setFractionLength(int minFrac, int maxFrac); in setFractionLength() argument
DDecimalQuantity_AbstractBCD.java160 public void setFractionLength(int minFrac, int maxFrac) { in setFractionLength() argument
163 assert maxFrac >= minFrac; in setFractionLength()
168 rOptPos = -maxFrac; in setFractionLength()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/
DDecimalQuantityTest.java377 int maxFrac = (Integer) cas[1]; in testUseApproximateDoubleWhenAble() local
383 fq.roundToMagnitude(-maxFrac, mc); in testUseApproximateDoubleWhenAble()
385 … "Using approximate double after rounding: " + d + " maxFrac=" + maxFrac + " " + mc, in testUseApproximateDoubleWhenAble()
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DDecimalQuantityTest.java374 int maxFrac = (Integer) cas[1]; in testUseApproximateDoubleWhenAble() local
380 fq.roundToMagnitude(-maxFrac, mc); in testUseApproximateDoubleWhenAble()
382 … "Using approximate double after rounding: " + d + " maxFrac=" + maxFrac + " " + mc, in testUseApproximateDoubleWhenAble()
/external/icu/icu4c/source/test/intltest/
Dnumbertest_decimalquantity.cpp284 int32_t maxFrac; in testUseApproximateDoubleWhenAble() member
305 fq.roundToMagnitude(-cas.maxFrac, cas.roundingMode, status); in testUseApproximateDoubleWhenAble()
/external/icu/icu4c/source/test/testdata/
Dnumberformattestspecification.txt323 // JDK gives 2.99792458E8 (maxInt + maxFrac instead of minInt + maxFrac)
334 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)?

12