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 …]
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.java451 assertTrue(">>1 == /2", d.divide(two).equals(c)); in test_shiftRightI()
457 assertTrue(">>1 == /2", f.subtract(one).divide(two).equals(e)); in test_shiftRightI()
567 largePos.divide(zero); in test_divideLjava_math_BigInteger()
573 bi1.divide(zero); in test_divideLjava_math_BigInteger()
579 bi3.negate().divide(zero); in test_divideLjava_math_BigInteger()
585 zero.divide(zero); in test_divideLjava_math_BigInteger()
899 BigInteger q = i1.divide(i2); in testDiv()
/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java1559 public BigDecimal divide(BigDecimal divisor, int scale, int roundingMode) { in divide() method in BigDecimal
1564 …return divide(this.intCompact, this.scale, divisor.intCompact, divisor.scale, scale, roundingMode); in divide()
1566 … return divide(this.intCompact, this.scale, divisor.intVal, divisor.scale, scale, roundingMode); in divide()
1570 … return divide(this.intVal, this.scale, divisor.intCompact, divisor.scale, scale, roundingMode); in divide()
1572 … return divide(this.intVal, this.scale, divisor.intVal, divisor.scale, scale, roundingMode); in divide()
1593 public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMode) { in divide() method in BigDecimal
1594 return divide(divisor, scale, roundingMode.oldMode); in divide()
1624 public BigDecimal divide(BigDecimal divisor, int roundingMode) { in divide() method in BigDecimal
1625 return this.divide(divisor, scale, roundingMode); in divide()
1643 public BigDecimal divide(BigDecimal divisor, RoundingMode roundingMode) { in divide() method in BigDecimal
[all …]
DMutableBigInteger.java1146 MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient) { in divide() method in MutableBigInteger
1147 return divide(b,quotient,true); in divide()
1150 … MutableBigInteger divide(MutableBigInteger b, MutableBigInteger quotient, boolean needRemainder) { in divide() method in MutableBigInteger
1438 long divide(long v, MutableBigInteger quotient) { in divide() method in MutableBigInteger
1882 MutableBigInteger r = a.divide(b, q);
2019 return result.divide(p, temp1);
2147 MutableBigInteger remainder = c.divide(p,
2196 c = c.divide(p, new MutableBigInteger());
2212 MutableBigInteger r = b.divide(a, q);
2224 r = a.divide(b, q);
[all …]
DBigInteger.java2212 @NonNull public BigInteger divide(@NonNull BigInteger val) { in divide() method
2756 result = t1.divide(new MutableBigInteger(m), q).toBigInteger(); in modPow()
2953 MutableBigInteger r= a2.divide(b2, q); in oddModPow()
3947 MutableBigInteger r = a.divide(b, q);
/libcore/benchmarks/src/benchmarks/regression/
DBigIntegerBenchmark.java28 x.divide(y); in timeRandomDivision()
/libcore/ojluni/src/test/java/lang/Math/
DDivModTests.java228 BigDecimal resultD = xD.divide(yD, RoundingMode.FLOOR); in testLongFloorMod()
333 BigDecimal resultD = xD.divide(yD, RoundingMode.FLOOR); in testLongIntFloorMod()
/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.java978 return create(toBigDecimalSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN)); in dividedBy()