Home
last modified time | relevance | path

Searched refs:divide (Results 1 – 10 of 10) sorted by relevance

/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalArithmeticTest.java197 a.round(mc).divide(b.round(mc)).toString()); in testDivideINonTrivial()
198 res = a.divide(b, BigDecimal.ROUND_FLOOR); in testDivideINonTrivial()
203 res = a.divide(b, BigDecimal.ROUND_UNNECESSARY); in testDivideINonTrivial()
209 res = a.divide(b, BigDecimal.ROUND_UNNECESSARY); in testDivideINonTrivial()
223 res = a.divide(b, -1220, BigDecimal.ROUND_FLOOR); in testDivideIINonTrivial()
228 res = a.divide(b, 1, BigDecimal.ROUND_UNNECESSARY); in testDivideIINonTrivial()
234 res = a.divide(b, 0, BigDecimal.ROUND_UNNECESSARY); in testDivideIINonTrivial()
252 a.round(mc).divide(b.round(mc)).toString()); in testDivideScaleRoundingModeNonTrivial()
253 res = a.divide(b, mc); in testDivideScaleRoundingModeNonTrivial()
259 res = a.divide(b, mc); in testDivideScaleRoundingModeNonTrivial()
[all …]
DBigDecimalTest.java57 BigDecimal computed = parsed.divide(BigDecimal.ONE); in assertPrecision()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerDivideTest.java42 aNumber.divide(bNumber); in testCase1()
57 aNumber.divide(bNumber); in testCase2()
74 BigInteger result = aNumber.divide(bNumber); in testCase3()
94 BigInteger result = aNumber.divide(bNumber); in testCase4()
115 BigInteger result = aNumber.divide(bNumber); in testCase5()
136 BigInteger result = aNumber.divide(bNumber); in testCase6()
156 BigInteger result = aNumber.divide(bNumber); in testCase7()
176 BigInteger result = aNumber.divide(bNumber); in testCase8()
196 BigInteger result = aNumber.divide(bNumber); in testCase9()
216 BigInteger result = aNumber.divide(bNumber); in testCase10()
[all …]
DBigDecimalArithmeticTest.java486 aNumber.divide(bNumber); in testDivideByZero()
504 aNumber.divide(bNumber, BigDecimal.ROUND_UNNECESSARY); in testDivideExceptionRM()
522 aNumber.divide(bNumber, 100); in testDivideExceptionInvalidRM()
541 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_CEILING); in testDivideExpLessZero()
558 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_CEILING); in testDivideExpEqualsZero()
575 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_CEILING); in testDivideExpGreaterZero()
592 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_CEILING); in testDivideRemainderIsZero()
609 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_UP); in testDivideRoundUpNeg()
626 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_UP); in testDivideRoundUpPos()
643 BigDecimal result = aNumber.divide(bNumber, resScale, BigDecimal.ROUND_DOWN); in testDivideRoundDownNeg()
[all …]
DBigIntegerHashCodeTest.java44 aNumber1.divide(aNumber2).bitLength(); in testSameObject()
DBigDecimalTest.java220 BigDecimal divd3 = divd1.divide(divd2, BigDecimal.ROUND_UP); in test_divideLjava_math_BigDecimalI()
228 divd3 = divd1.divide(divd2, BigDecimal.ROUND_DOWN); in test_divideLjava_math_BigDecimalI()
235 divd1.divide(divd2, BigDecimal.ROUND_DOWN); in test_divideLjava_math_BigDecimalI()
247 BigDecimal divd3 = divd1.divide(divd2, 3, BigDecimal.ROUND_HALF_UP); in test_divideLjava_math_BigDecimalII()
252 divd3 = divd1.divide(divd2, 0, BigDecimal.ROUND_DOWN); in test_divideLjava_math_BigDecimalII()
259 divd1.divide(divd2, 4, BigDecimal.ROUND_DOWN); in test_divideLjava_math_BigDecimalII()
DBigIntegerTest.java455 assertTrue(">>1 == /2", d.divide(two).equals(c)); in test_shiftRightI()
461 assertTrue(">>1 == /2", f.subtract(one).divide(two).equals(e)); in test_shiftRightI()
571 largePos.divide(zero); in test_divideLjava_math_BigInteger()
577 bi1.divide(zero); in test_divideLjava_math_BigInteger()
583 bi3.negate().divide(zero); in test_divideLjava_math_BigInteger()
589 zero.divide(zero); in test_divideLjava_math_BigInteger()
903 BigInteger q = i1.divide(i2); in testDiv()
/libcore/luni/src/main/java/java/math/
DBigDecimal.java991 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { in divide() method in BigDecimal
992 return divide(divisor, scale, RoundingMode.valueOf(roundingMode)); in divide()
1018 public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode) { in divide() method in BigDecimal
1149 public BigDecimal divide(BigDecimal divisor, int roundingMode) { in divide() method in BigDecimal
1150 return divide(divisor, scale, RoundingMode.valueOf(roundingMode)); in divide()
1173 public BigDecimal divide(BigDecimal divisor, RoundingMode roundingMode) { in divide() method in BigDecimal
1174 return divide(divisor, scale, roundingMode); in divide()
1194 public BigDecimal divide(BigDecimal divisor) { in divide() method in BigDecimal
1214 p = p.divide(gcd); in divide()
1215 q = q.divide(gcd); in divide()
[all …]
DBigInteger.java936 public BigInteger divide(BigInteger divisor) { in divide() method in BigInteger
/libcore/benchmarks/src/benchmarks/regression/
DBigIntegerBenchmark.java30 x.divide(y); in timeRandomDivision()