/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() 444 int maxFrac = reduced.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 | 133 int maxFrac = properties.getMaximumFractionDigits(); in oldToNew() local 139 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 145 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 147 maxFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 149 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 150 } else if (maxFrac == -1) { in oldToNew() 151 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 158 if (minInt == 0 && maxFrac != 0) { in oldToNew() 160 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 166 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 1124 int maxFrac; in parseFractionStem() local 1134 maxFrac = -1; in parseFractionStem() 1137 maxFrac = minFrac; in parseFractionStem() 1140 maxFrac++; in parseFractionStem() 1147 maxFrac = minFrac; in parseFractionStem() 1153 if (maxFrac == -1) { 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() 1171 if (maxFrac == -1) { 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() 432 int maxFrac = reduced.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 | 134 int maxFrac = properties.getMaximumFractionDigits(); in oldToNew() local 140 boolean explicitMinMaxFrac = minFrac != -1 || maxFrac != -1; in oldToNew() 146 if (minFrac == -1 && maxFrac == -1) { in oldToNew() 148 maxFrac = currency.getDefaultFractionDigits(currencyUsage); in oldToNew() 150 minFrac = Math.min(maxFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 151 } else if (maxFrac == -1) { in oldToNew() 152 maxFrac = Math.max(minFrac, currency.getDefaultFractionDigits(currencyUsage)); in oldToNew() 159 if (minInt == 0 && maxFrac != 0) { in oldToNew() 161 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 167 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() [all …]
|
D | NumberSkeletonImpl.java | 1125 int maxFrac; in parseFractionStem() local 1135 maxFrac = -1; in parseFractionStem() 1138 maxFrac = minFrac; in parseFractionStem() 1141 maxFrac++; in parseFractionStem() 1148 maxFrac = minFrac; in parseFractionStem() 1154 if (maxFrac == -1) { 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() 1172 if (maxFrac == -1) { in generateFractionStem() [all …]
|
/external/icu/icu4c/source/i18n/ |
D | number_mapper.cpp | 90 int32_t maxFrac = properties.maximumFractionDigits; 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() 109 maxFrac = digits; in oldToNew() 111 minFrac = std::min(maxFrac, digits); in oldToNew() 113 maxFrac = std::max(minFrac, digits); in oldToNew() 118 if (minInt == 0 && maxFrac != 0) { in oldToNew() 120 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() 126 maxFrac = maxFrac < 0 ? -1 : maxFrac < minFrac ? minFrac : maxFrac; in oldToNew() [all …]
|
D | number_rounding.cpp | 61 int32_t getRoundingMagnitudeFraction(int maxFrac) { in getRoundingMagnitudeFraction() argument 62 if (maxFrac == -1) { in getRoundingMagnitudeFraction() 65 return -maxFrac; in getRoundingMagnitudeFraction() 260 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { in constructFraction() argument 263 settings.fMaxFrac = static_cast<digits_t>(maxFrac); in constructFraction()
|
D | number_patternstring.cpp | 656 bool PatternStringUtils::ignoreRoundingIncrement(double roundIncr, int32_t maxFrac) { in ignoreRoundingIncrement() argument 657 if (maxFrac < 0) { in ignoreRoundingIncrement() 662 for (frac = 0; frac <= maxFrac && roundIncr <= 1.0; frac++, roundIncr *= 10.0); in ignoreRoundingIncrement() 663 return (frac > maxFrac); in ignoreRoundingIncrement() 682 int32_t maxFrac = uprv_min(properties.maximumFractionDigits, dosMax); in propertiesToPatternString() local 716 } else if (roundingInterval != 0.0 && !ignoreRoundingIncrement(roundingInterval,maxFrac)) { in propertiesToPatternString() 743 int32_t mN = (maxFrac != dosMax) ? uprv_min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
|
D | number_skeletons.cpp | 1093 int32_t maxFrac; in parseFractionStem() local 1103 maxFrac = -1; in parseFractionStem() 1106 maxFrac = minFrac; in parseFractionStem() 1109 maxFrac++; in parseFractionStem() 1116 maxFrac = minFrac; in parseFractionStem() 1124 if (maxFrac == -1) { 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() 1143 if (maxFrac == -1) { in generateFractionStem() [all …]
|
D | number_patternstring.h | 257 static bool ignoreRoundingIncrement(double roundIncr, int32_t maxFrac);
|
D | number_skeletons.h | 259 void generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode& status);
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/number/ |
D | PatternStringUtils.java | 54 public static boolean ignoreRoundingIncrement(BigDecimal roundIncrDec, int maxFrac) { in ignoreRoundingIncrement() argument 59 if (maxFrac < 0) { in ignoreRoundingIncrement() 64 for (frac = 0; frac <= maxFrac && roundIncr <= 1.0; frac++, roundIncr *= 10.0); in ignoreRoundingIncrement() 65 return (frac > maxFrac); in ignoreRoundingIncrement() 95 int maxFrac = Math.min(properties.getMaximumFractionDigits(), dosMax); in propertiesToPatternString() local 128 } else if (roundingInterval != null && !ignoreRoundingIncrement(roundingInterval,maxFrac)) { in propertiesToPatternString() 151 int mN = (maxFrac != dosMax) ? Math.min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/ |
D | PatternStringUtils.java | 49 public static boolean ignoreRoundingIncrement(BigDecimal roundIncrDec, int maxFrac) { in ignoreRoundingIncrement() argument 54 if (maxFrac < 0) { in ignoreRoundingIncrement() 59 for (frac = 0; frac <= maxFrac && roundIncr <= 1.0; frac++, roundIncr *= 10.0); in ignoreRoundingIncrement() 60 return (frac > maxFrac); in ignoreRoundingIncrement() 90 int maxFrac = Math.min(properties.getMaximumFractionDigits(), dosMax); in propertiesToPatternString() local 123 } else if (roundingInterval != null && !ignoreRoundingIncrement(roundingInterval,maxFrac)) { in propertiesToPatternString() 146 int mN = (maxFrac != dosMax) ? Math.min(-maxFrac, digitsStringScale) : digitsStringScale; in propertiesToPatternString()
|
/external/icu/libicu/cts_headers/ |
D | number_patternstring.h | 257 static bool ignoreRoundingIncrement(double roundIncr, int32_t maxFrac);
|
D | number_skeletons.h | 259 void generateFractionStem(int32_t minFrac, int32_t maxFrac, UnicodeString& sb, UErrorCode& status);
|
/external/icu/icu4c/source/test/cintltst/ |
D | cnumtst.c | 3263 int32_t maxFrac; member 3315 static UBool ignoreRoundingIncrement(double roundIncr, int32_t maxFrac) { in ignoreRoundingIncrement() argument 3316 if (maxFrac < 0) { in ignoreRoundingIncrement() 3321 for (frac = 0; frac <= maxFrac && roundIncr <= 1.0; frac++, roundIncr *= 10.0); in ignoreRoundingIncrement() 3322 return (frac > maxFrac); in ignoreRoundingIncrement() 3342 unum_setAttribute(unf, UNUM_MAX_FRACTION_DIGITS, itemPtr->maxFrac); in TestSetMaxFracAndRoundIncr() 3345 …ed = (itemPtr->roundIncr != 0.0 && !ignoreRoundingIncrement(itemPtr->roundIncr, itemPtr->maxFrac)); in TestSetMaxFracAndRoundIncr() 3358 int32_t maxFrac = unum_getAttribute(unf, UNUM_MAX_FRACTION_DIGITS); in TestSetMaxFracAndRoundIncr() local 3360 int32_t expMaxFrac = (roundIncrUsed)? itemPtr->minFrac: itemPtr->maxFrac; in TestSetMaxFracAndRoundIncr() 3361 if (maxFrac != expMaxFrac) { in TestSetMaxFracAndRoundIncr() [all …]
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/ |
D | DecimalQuantityTest.java | 397 int maxFrac = (Integer) cas[1]; in testUseApproximateDoubleWhenAble() local 403 fq.roundToMagnitude(-maxFrac, mc); in testUseApproximateDoubleWhenAble() 405 … "Using approximate double after rounding: " + d + " maxFrac=" + maxFrac + " " + mc, in testUseApproximateDoubleWhenAble()
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/ |
D | DecimalQuantityTest.java | 394 int maxFrac = (Integer) cas[1]; in testUseApproximateDoubleWhenAble() local 400 fq.roundToMagnitude(-maxFrac, mc); in testUseApproximateDoubleWhenAble() 402 … "Using approximate double after rounding: " + d + " maxFrac=" + maxFrac + " " + mc, in testUseApproximateDoubleWhenAble()
|
/external/icu/icu4c/source/test/intltest/ |
D | numbertest_decimalquantity.cpp | 302 int32_t maxFrac; in testUseApproximateDoubleWhenAble() member 323 fq.roundToMagnitude(-cas.maxFrac, cas.roundingMode, status); in testUseApproximateDoubleWhenAble()
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/data/ |
D | numberformattestspecification.txt | 342 // JDK gives 2.99792458E8 (maxInt + maxFrac instead of minInt + maxFrac) 353 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)?
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/data/ |
D | numberformattestspecification.txt | 342 // JDK gives 2.99792458E8 (maxInt + maxFrac instead of minInt + maxFrac) 353 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)?
|
/external/icu/icu4c/source/test/testdata/ |
D | numberformattestspecification.txt | 342 // JDK gives 2.99792458E8 (maxInt + maxFrac instead of minInt + maxFrac) 353 // JDK gives 299.8E6 (maybe maxInt + maxFrac instead of minInt + maxFrac)?
|
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
D | NumberFormatTest.java | 4069 int maxFrac; in TestSetMaxFracAndRoundIncr() field in NumberFormatTest.SetMxFrAndRndIncrItem 4082 maxFrac = mxF; in TestSetMaxFracAndRoundIncr() 4127 df.setMaximumFractionDigits(item.maxFrac); in TestSetMaxFracAndRoundIncr() 4131 …ernStringUtils.ignoreRoundingIncrement(java.math.BigDecimal.valueOf(item.roundIncr),item.maxFrac)); in TestSetMaxFracAndRoundIncr() 4147 int maxFrac = df.getMaximumFractionDigits(); in TestSetMaxFracAndRoundIncr() local 4148 int expMaxFrac = (roundIncrUsed)? fracForRoundIncr: item.maxFrac; in TestSetMaxFracAndRoundIncr() 4149 if (maxFrac != expMaxFrac) { in TestSetMaxFracAndRoundIncr() 4150 …test " + item.descrip + ": getMaximumFractionDigits, expected " + expMaxFrac + ", got " + maxFrac); in TestSetMaxFracAndRoundIncr()
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
D | NumberFormatTest.java | 4072 int maxFrac; in TestSetMaxFracAndRoundIncr() field in NumberFormatTest.SetMxFrAndRndIncrItem 4085 maxFrac = mxF; in TestSetMaxFracAndRoundIncr() 4130 df.setMaximumFractionDigits(item.maxFrac); in TestSetMaxFracAndRoundIncr() 4134 …ernStringUtils.ignoreRoundingIncrement(java.math.BigDecimal.valueOf(item.roundIncr),item.maxFrac)); in TestSetMaxFracAndRoundIncr() 4150 int maxFrac = df.getMaximumFractionDigits(); in TestSetMaxFracAndRoundIncr() local 4151 int expMaxFrac = (roundIncrUsed)? fracForRoundIncr: item.maxFrac; in TestSetMaxFracAndRoundIncr() 4152 if (maxFrac != expMaxFrac) { in TestSetMaxFracAndRoundIncr() 4153 …test " + item.descrip + ": getMaximumFractionDigits, expected " + expMaxFrac + ", got " + maxFrac); in TestSetMaxFracAndRoundIncr()
|