/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalArithmeticTest.java | 197 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 …]
|
D | BigDecimalTest.java | 62 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 …]
|
D | BigIntegerTest.java | 194 BigInteger posV = negV.divide(BigInteger.valueOf(-1)); in test_divide_avoids64bitOverflow()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerDivideTest.java | 42 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 …]
|
D | BigDecimalArithmeticTest.java | 486 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 …]
|
D | BigIntegerHashCodeTest.java | 44 aNumber1.divide(aNumber2).bitLength(); in testSameObject()
|
D | BigDecimalTest.java | 220 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()
|
D | BigIntegerTest.java | 451 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/benchmarks/src/benchmarks/ |
D | BigIntegerBenchmark.java | 81 sum = sum.add(scaledOne.divide(BigInteger.valueOf(i))); in harmonic1000() 129 return tmp.multiply(base).divide(scaleBy); in myPow() 132 return tmp.multiply(tmp).divide(scaleBy); in myPow() 141 BigInteger base = scaledOne.add(scaledOne.divide(BigInteger.valueOf(n))); in eApprox()
|
/libcore/ojluni/src/main/java/java/math/ |
D | BigDecimal.java | 1559 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 …]
|
D | MutableBigInteger.java | 1146 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 …]
|
D | BigInteger.java | 2212 @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/ |
D | BigIntegerBenchmark.java | 28 x.divide(y); in timeRandomDivision()
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | DivModTests.java | 228 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/ |
D | LongTest.java | 193 assertEquals(dividend.divide(divisor).longValue(), uq);
|
/libcore/ojluni/src/main/java/java/lang/ |
D | Long.java | 1312 divide(toUnsignedBigInteger(divisor)).longValue(); in divideUnsigned()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 978 return create(toBigDecimalSeconds().divide(BigDecimal.valueOf(divisor), RoundingMode.DOWN)); in dividedBy()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatterBuilder.java | 2719 totalBig = totalBig.divide(BigInteger.TEN); in parse() 3043 BigDecimal fraction = valueBD.divide(rangeBD, 9, RoundingMode.FLOOR); in convertToFraction()
|
/libcore/api/ |
D | current.txt | 4703 method public java.math.BigDecimal divide(java.math.BigDecimal, int, int); 4704 method public java.math.BigDecimal divide(java.math.BigDecimal, int, java.math.RoundingMode); 4705 method public java.math.BigDecimal divide(java.math.BigDecimal, int); 4706 method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.RoundingMode); 4707 method public java.math.BigDecimal divide(java.math.BigDecimal); 4708 method public java.math.BigDecimal divide(java.math.BigDecimal, java.math.MathContext); 4783 method @NonNull public java.math.BigInteger divide(@NonNull java.math.BigInteger);
|