/libcore/luni/src/main/java/java/math/ |
D | Multiplication.java | 77 bigFivePows[i] = bigFivePows[i - 1].multiply(bigFivePows[1]); 78 bigTenPows[i] = bigTenPows[i - 1].multiply(BigInteger.TEN); 108 : val.multiply(powerOf10(exp))); in multiplyByTenPow() 150 res = res.multiply(powerOfFive); in powerOf10() 153 res = res.multiply(bigFivePows[1].pow(intExp)); in powerOf10() 182 return val.multiply(bigFivePows[exp]); in multiplyByFivePow() 184 return val.multiply(bigFivePows[1].pow(exp)); in multiplyByFivePow()
|
D | BigDecimal.java | 932 public BigDecimal multiply(BigDecimal multiplicand) { in multiply() method in BigDecimal 949 return new BigDecimal(this.getUnscaledValue().multiply( in multiply() 966 public BigDecimal multiply(BigDecimal multiplicand, MathContext mc) { in multiply() method in BigDecimal 967 BigDecimal result = multiply(multiplicand); in multiply() 1299 quotAndRem[0] = getUnscaledValue().multiply( Multiplication.powerOf10(trailingZeros) ); in divide() 1309 integerQuot = integerQuot.multiply(BigInteger.TEN) in divide() 1369 … integralValue = getUnscaledValue().divide( divisor.getUnscaledValue().multiply(powerOfTen) ); in divideToIntegralValue() 1370 integralValue = integralValue.multiply(powerOfTen); in divideToIntegralValue() 1373 … integralValue = getUnscaledValue().multiply(powerOfTen).divide( divisor.getUnscaledValue() ); in divideToIntegralValue() 1440 divisor.getUnscaledValue().multiply(Multiplication.powerOf10(diffScale)) ); in divideToIntegralValue() [all …]
|
D | BigInteger.java | 916 @NonNull public BigInteger multiply(@NonNull BigInteger value) { in multiply() method in BigInteger
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerMultiplyTest.java | 42 BigInteger result = aNumber.multiply(bNumber); in testCase1() 63 BigInteger result = aNumber.multiply(bNumber); in testCase2() 85 BigInteger result = aNumber.multiply(bNumber); in testCase3() 107 BigInteger result = aNumber.multiply(bNumber); in testCase4() 130 BigInteger result = aNumber.multiply(bNumber); in testCase5() 153 BigInteger result = aNumber.multiply(bNumber); in testCase6() 173 BigInteger result = aNumber.multiply(bNumber); in testCase7() 191 BigInteger result = aNumber.multiply(bNumber); in testCase8() 209 BigInteger result = aNumber.multiply(bNumber); in testCase9() 227 BigInteger result = aNumber.multiply(bNumber); in testCase10() [all …]
|
D | BigIntegerTest.java | 195 bi = BigInteger.valueOf(rand.nextInt(1000000)).multiply( in test_isProbablePrimeI() 203 bi = new BigInteger(70, rand).multiply(new BigInteger(70, rand)); in test_isProbablePrimeI() 360 .multiply(two.pow(40)).equals(twoToTheSeventy)); in test_powI() 377 + " equals " + inv, one.equals(a.multiply(inv).mod( in test_modInverseLjava_math_BigInteger() 398 + " equals " + inv, one.equals(a.multiply(inv).mod( in test_modInverseLjava_math_BigInteger() 499 assertTrue("<<1 == *2", b.multiply(two).equals(a)); in test_shiftLeftI() 506 assertTrue("<<1 == *2 negative", d.multiply(two).equals(c)); in test_shiftLeftI() 518 aZillion.multiply(new BigInteger("3", 10)))); in test_multiplyLjava_math_BigInteger() 520 assertTrue("0*0", zero.multiply(zero).equals(zero)); in test_multiplyLjava_math_BigInteger() 521 assertTrue("0*1", zero.multiply(one).equals(zero)); in test_multiplyLjava_math_BigInteger() [all …]
|
D | OldBigIntegerTest.java | 147 bi = BigInteger.valueOf(rand.nextInt(1000000)).multiply( in test_isProbablePrimeI() 155 bi = new BigInteger(70, rand).multiply(new BigInteger(70, rand)); in test_isProbablePrimeI() 179 BigInteger c = a.multiply(b); in test_isProbablePrimeI() 205 BigInteger wp = a.multiply(b); in largePrimesProduct()
|
D | BigIntegerHashCodeTest.java | 43 aNumber1.multiply(aNumber2).toByteArray(); in testSameObject()
|
D | BigDecimalTest.java | 506 BigDecimal result = multi1.multiply(multi2); in test_multiplyLjava_math_BigDecimal() 512 result = multi1.multiply(multi2); in test_multiplyLjava_math_BigDecimal() 518 result = multi1.multiply(multi2); in test_multiplyLjava_math_BigDecimal() 524 result = multi1.multiply(multi2); in test_multiplyLjava_math_BigDecimal() 529 result = multi1.multiply(multi2); in test_multiplyLjava_math_BigDecimal()
|
D | BigDecimalArithmeticTest.java | 307 BigDecimal result = aNumber.multiply(bNumber); in testMultiplyScalePosPos() 325 BigDecimal result = aNumber.multiply(bNumber, mc); in testMultiplyMathContextScalePosPos() 342 BigDecimal result = aNumber.multiply(bNumber); in testMultiplyEqualScaleNegNeg() 359 BigDecimal result = aNumber.multiply(bNumber); in testMultiplyDiffScalePosNeg() 377 BigDecimal result = aNumber.multiply(bNumber, mc); in testMultiplyMathContextDiffScalePosNeg() 394 BigDecimal result = aNumber.multiply(bNumber); in testMultiplyDiffScaleNegPos() 412 BigDecimal result = aNumber.multiply(bNumber, mc); in testMultiplyMathContextDiffScaleNegPos()
|
D | BigDecimalCompareTest.java | 508 BigDecimal testInstance = BigDecimal.TEN.multiply(new BigDecimal("0.1")); in testApproxPrecision()
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | BigDecimalTest.java | 76 BigDecimal b = a.multiply(BigDecimal.ONE); in testPrecisionFromString() 334 assertEquals(bigValue, bigHalfValue.multiply(two)); in checkCommonOperations() 369 valueOf(a).multiply(valueOf(b)).toString()); in checkMultiply_consistentWithLong() 373 assertEquals(valueOf(expectedResult, 5), valueOf(a, 2).multiply(valueOf(b, 3))); in checkMultiply_consistentWithLong() 379 valueOf(-(1L << 62L), 2).multiply(valueOf(-2, 1)).toString()); in testMultiply_near64BitOverflow_scaled() 383 valueOf(-(1L << 62L), 2).multiply(valueOf(2, 1)).toString()); in testMultiply_near64BitOverflow_scaled() 387 valueOf(-(1L << 62L), -2).multiply(valueOf(-2, 1))); in testMultiply_near64BitOverflow_scaled() 419 BigDecimal result = bigA.multiply(bigB); in bigMultiply() 420 assertEquals("Multiplication should be commutative", result, bigB.multiply(bigA)); in bigMultiply()
|
D | OldBigDecimalArithmeticTest.java | 83 res = a.round(mc).multiply(b.round(mc)); in testMultiplyMathContextNonTrivial() 87 res = a.multiply(b, mc); in testMultiplyMathContextNonTrivial() 346 res = a.multiply(b); in testDivideToIntegralValueMathContextNonTrivial()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | Duration.java | 633 public Duration multiply(int factor) { in multiply() method in Duration 634 return multiply(BigDecimal.valueOf(factor)); in multiply() 684 public abstract Duration multiply(final BigDecimal factor); in multiply() method in Duration
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BigIntegerBenchmark.java | 46 x.multiply(y); in timeRandomMultiplication()
|
/libcore/benchmarks/src/benchmarks/ |
D | SmallBigIntegerBenchmark.java | 48 x = x.multiply(BIG_THREE).add(BigInteger.ONE); in main()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StrictMathTest.java | 119 BigInteger expected = BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)); in testMultiplyExactL()
|
D | MathTest.java | 158 BigInteger expected = BigInteger.valueOf(a).multiply(BigInteger.valueOf(b)); in testMultiplyExactL()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 957 return create(toSeconds().multiply(BigDecimal.valueOf(multiplicand))); in multipliedBy()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeFormatterBuilder.java | 2667 totalBig = totalBig.multiply(BigInteger.TEN).add(BigInteger.valueOf(digit)); in parse() 3059 … BigDecimal valueBD = fraction.multiply(rangeBD).setScale(0, RoundingMode.FLOOR).add(minBD); in convertFromFraction()
|