Home
last modified time | relevance | path

Searched refs:HALF_UP (Results 1 – 19 of 19) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
DBigDecimalTest.java111 assertEquals("1.20", a.abs(new MathContext(3,RoundingMode.HALF_UP)).toPlainString()); in test54580()
140 checkDivide("0", 1, Long.MIN_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding()
145 checkDivide("0.50", Long.MAX_VALUE / 2, Long.MAX_VALUE, 2, RoundingMode.HALF_UP); in testDivideRounding()
146 checkDivide("0.50", Long.MIN_VALUE / 2, Long.MIN_VALUE, 2, RoundingMode.HALF_UP); in testDivideRounding()
147 checkDivide("0.5000", Long.MIN_VALUE / 2, Long.MIN_VALUE, 4, RoundingMode.HALF_UP); in testDivideRounding()
149 checkDivide("0", Long.MIN_VALUE / 2 + 1, Long.MIN_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding()
150 checkDivide("1", Long.MIN_VALUE / 2, Long.MIN_VALUE, 0, RoundingMode.HALF_UP); in testDivideRounding()
163 checkDivide("0", 49, 100, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
164 checkDivide("1", 50, 100, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
165 checkDivide("1", 51, 101, 0, RoundingMode.HALF_UP); in testDivideRounding_sign()
[all …]
DOldBigDecimalConstructorsTest.java84 mc = new MathContext(34, RoundingMode.HALF_UP); in testConstrBigIntegerMathContext()
171 mc = new MathContext(34, RoundingMode.HALF_UP); in testConstrBigIntegerScaleMathContext()
231 mc = new MathContext(34, RoundingMode.HALF_UP); in testConstrBigIntegerScaleMathContext()
340 mc = new MathContext(34, RoundingMode.HALF_UP); in testConstrCharIntIntMathContext()
486 mc = new MathContext(11, RoundingMode.HALF_UP); in testConstrDoubleMathContext()
545 mc = new MathContext(11, RoundingMode.HALF_UP); in testConstrDoubleMathContext_AndroidFailure()
617 mc = new MathContext(16, RoundingMode.HALF_UP); in testConstrLongMathContext()
DOldBigDecimalTest.java165 setScale2 = setScale1.setScale(3, RoundingMode.HALF_UP); in test_setScaleILjava_math_RoundingMode()
171 setScale2 = setNeg.setScale(0, RoundingMode.HALF_UP); in test_setScaleILjava_math_RoundingMode()
DOldBigDecimalConvertTest.java168 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_UP); in test_ByteValueExactStringZero()
270 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_UP); in test_ByteValueCharZero()
280 MathContext mc = new MathContext(iPresition, RoundingMode.HALF_UP); in test_ByteValueStringZero()
DOldBigDecimalArithmeticTest.java118 MathContext mc = new MathContext(5, RoundingMode.HALF_UP); in testPowMathContext()
603 RoundingMode rm = RoundingMode.HALF_UP; in test_DivideBigDecimalRoundingModeHALF_UP()
/libcore/ojluni/src/main/java/java/math/
DRoundingMode.java259 HALF_UP(BigDecimal.ROUND_HALF_UP), enumConstant
385 case BigDecimal.ROUND_HALF_UP -> HALF_UP; in valueOf()
DMathContext.java62 private static final RoundingMode DEFAULT_ROUNDINGMODE = RoundingMode.HALF_UP;
77 new MathContext(0, RoundingMode.HALF_UP);
DBigDecimal.java2247 case HALF_UP: in sqrt()
2429 case HALF_UP:
/libcore/ojluni/src/test/java/math/BigDecimal/
DSquareRootTests.java96 RoundingMode.HALF_UP, RoundingMode.HALF_DOWN, RoundingMode.HALF_EVEN); in oneDigitTests()
125 RoundingMode.HALF_UP, RoundingMode.HALF_DOWN, RoundingMode.HALF_EVEN); in twoDigitTests()
191 RoundingMode.HALF_UP, RoundingMode.HALF_DOWN, RoundingMode.HALF_EVEN in squareRootTwoTests()
369 RoundingMode.HALF_UP,
665 case HALF_UP:
DDivideTests.java331 BigDecimal quo = test[0].divide(test[1], RoundingMode.HALF_UP); in scaledRoundedDivideTests()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DRoundingModeTest.java34 …f failed for ROUND_HALF_UP", RoundingMode.valueOf(BigDecimal.ROUND_HALF_UP), RoundingMode.HALF_UP); in test_valueOfI()
DMathContextTest.java45 RoundingMode.HALF_UP, in test_MathContextConstruction()
DBigDecimalArithmeticTest.java376 MathContext mc = new MathContext(53, RoundingMode.HALF_UP); in testMultiplyMathContextDiffScalePosNeg()
411 MathContext mc = new MathContext(47, RoundingMode.HALF_UP); in testMultiplyMathContextDiffScaleNegPos()
471 MathContext mc = new MathContext(5, RoundingMode.HALF_UP); in testPowMathContext()
1103 RoundingMode rm = RoundingMode.HALF_UP; in testDivideBigDecimalScaleRoundingModeHALF_UP()
1239 RoundingMode rm = RoundingMode.HALF_UP; in testDivideBigDecimalScaleMathContextHALF_UP()
1500 RoundingMode rm = RoundingMode.HALF_UP; in testRemainderMathContextHALF_UP()
1555 RoundingMode rm = RoundingMode.HALF_UP; in testRoundMathContextHALF_UP()
1572 RoundingMode rm = RoundingMode.HALF_UP; in testRoundMathContextPrecision0()
/libcore/ojluni/src/test/java/math/RoundingMode/
DRoundingModeTests.java68 Assert.assertEquals(RoundingMode.HALF_UP, RoundingMode.valueOf(BigDecimal.ROUND_HALF_UP), in testRoundingMode()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java2284 decimalFormat.setRoundingMode(RoundingMode.HALF_UP); in test_format_withRoundingMode()
2396 decimalFormat.setRoundingMode(RoundingMode.HALF_UP); in test_format_withRoundingMode()
2490 decimalFormat.setRoundingMode(RoundingMode.HALF_UP); in test_format_withRoundingMode()
2535 decimalFormat.setRoundingMode(RoundingMode.HALF_UP); in test_format_withRoundingMode()
/libcore/ojluni/src/main/java/java/text/
DDecimalFormat.java4323 case HALF_UP: in convertRoundingMode()
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java49 df.setRoundingMode(RoundingMode.HALF_UP); in test_setMaximumFractionDigitsAffectsRoundingMode()
/libcore/ojluni/src/main/java/java/util/
DFormatter.java3951 value = value.setScale(prec, RoundingMode.HALF_UP); in print()
/libcore/api/
Dcurrent.txt5406 enum_constant public static final java.math.RoundingMode HALF_UP;