Home
last modified time | relevance | path

Searched refs:divide (Results 1 – 15 of 15) 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.java62 BigDecimal computed = parsed.divide(BigDecimal.ONE); in assertPrecision()
130 new BigDecimal(n).divide(new BigDecimal(d), scale, rm)); in checkDivide()
273 minLong.divide(new BigDecimal("-1"), /* scale = */ 0, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
278 .divide(new BigDecimal("-0.1"), /* scale = */ 0, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
283 … .divide(new BigDecimal("-1E+1"), /* scale = */ 0, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
287 minLong.divide(new BigDecimal("-1E+1"), /* scale = */ 1, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
293 minLong.divide(new BigDecimal("-1"), /* scale = */ 1, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
297 minLong.divide(new BigDecimal("-1.0"), /* scale = */ 0, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
301 minLong.divide(new BigDecimal("-1.0"), /* scale = */ 1, RoundingMode.UNNECESSARY)); in testDivideAvoids64bitOverflow()
307 new BigDecimal("-4611686018427387904").divide( in testDivideAvoids64bitOverflow()
[all …]
DBigIntegerTest.java194 BigInteger posV = negV.divide(BigInteger.valueOf(-1)); in test_divide_avoids64bitOverflow()
/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.java456 assertTrue(">>1 == /2", d.divide(two).equals(c)); in test_shiftRightI()
462 assertTrue(">>1 == /2", f.subtract(one).divide(two).equals(e)); in test_shiftRightI()
572 largePos.divide(zero); in test_divideLjava_math_BigInteger()
578 bi1.divide(zero); in test_divideLjava_math_BigInteger()
584 bi3.negate().divide(zero); in test_divideLjava_math_BigInteger()
590 zero.divide(zero); in test_divideLjava_math_BigInteger()
904 BigInteger q = i1.divide(i2); in testDiv()
/libcore/luni/src/main/java/java/math/
DBigDecimal.java997 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { in divide() method in BigDecimal
998 return divide(divisor, scale, RoundingMode.valueOf(roundingMode)); in divide()
1024 public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode) { in divide() method in BigDecimal
1157 public BigDecimal divide(BigDecimal divisor, int roundingMode) { in divide() method in BigDecimal
1158 return divide(divisor, scale, RoundingMode.valueOf(roundingMode)); in divide()
1181 public BigDecimal divide(BigDecimal divisor, RoundingMode roundingMode) { in divide() method in BigDecimal
1182 return divide(divisor, scale, roundingMode); in divide()
1202 public BigDecimal divide(BigDecimal divisor) { in divide() method in BigDecimal
1222 p = p.divide(gcd); in divide()
1223 q = q.divide(gcd); in divide()
[all …]
DBigInteger.java958 @NonNull public BigInteger divide(@NonNull BigInteger divisor) { in divide() method in BigInteger
/libcore/benchmarks/src/benchmarks/regression/
DBigIntegerBenchmark.java28 x.divide(y); in timeRandomDivision()
/libcore/luni/src/test/java/libcore/java/lang/
DLongTest.java193 assertEquals(dividend.divide(divisor).longValue(), uq);
/libcore/ojluni/src/main/java/java/lang/
DLong.java1312 divide(toUnsignedBigInteger(divisor)).longValue(); in divideUnsigned()
/libcore/ojluni/src/main/java/java/time/
DDuration.java976 return create(toSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN)); in dividedBy()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatterBuilder.java2710 totalBig = totalBig.divide(BigInteger.TEN); in parse()
3034 BigDecimal fraction = valueBD.divide(rangeBD, 9, RoundingMode.FLOOR); in convertToFraction()