Home
last modified time | relevance | path

Searched refs:subtract (Results 1 – 23 of 23) sorted by relevance

/libcore/ojluni/src/main/java/java/math/
DSignedMutableBigInteger.java89 sign = sign * subtract(addend); in signedAdd()
100 sign = sign * subtract(addend); in signedAdd()
109 sign = sign * subtract(addend); in signedSubtract()
120 sign = sign * subtract(addend); in signedSubtract()
DBigInteger.java833 result = result.subtract(ONE); in nextProbablePrime()
990 v2 = v2.subtract(n);
998 u2 = u2.subtract(n);
1003 v2 = v2.subtract(n);
1023 BigInteger thisMinusOne = this.subtract(ONE); in passesMillerRabin()
1247 int[] resultMag = (cmp > 0 ? subtract(mag, val.mag)
1248 : subtract(val.mag, mag));
1268 int[] resultMag = (cmp > 0 ? subtract(mag, Math.abs(val)) : subtract(Math.abs(val), mag));
1368 private static int[] subtract(long val, int[] little) { in subtract() method
1404 private static int[] subtract(int[] big, long val) { in subtract() method
[all …]
DMutableBigInteger.java913 int subtract(MutableBigInteger b) { in subtract() method in MutableBigInteger
1371 a12.subtract(b1); in divide3n2n()
1377 d.subtract(new MutableBigInteger(b2)); in divide3n2n()
1388 quotient.subtract(MutableBigInteger.ONE); in divide3n2n()
1390 r.subtract(d); in divide3n2n()
2132 f.subtract(g);
2260 mod.subtract(t1);
DBigDecimal.java1436 public BigDecimal subtract(BigDecimal subtrahend) { in subtract() method in BigDecimal
1469 public BigDecimal subtract(BigDecimal subtrahend, MathContext mc) { in subtract() method in BigDecimal
1471 return subtract(subtrahend); in subtract()
1856 if (this.subtract(product).compareMagnitude(divisor) >= 0) { in divideToIntegralValue()
1952 result[1] = this.subtract(result[0].multiply(divisor)); in divideAndRemainder()
1990 result[1] = lhs.subtract(result[0].multiply(divisor)); in divideAndRemainder()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerSubtractTest.java43 BigInteger result = aNumber.subtract(bNumber); in testCase1()
64 BigInteger result = aNumber.subtract(bNumber); in testCase2()
86 BigInteger result = aNumber.subtract(bNumber); in testCase3()
108 BigInteger result = aNumber.subtract(bNumber); in testCase4()
129 BigInteger result = aNumber.subtract(bNumber); in testCase5()
150 BigInteger result = aNumber.subtract(bNumber); in testCase6()
172 BigInteger result = aNumber.subtract(bNumber); in testCase7()
194 BigInteger result = aNumber.subtract(bNumber); in testCase8()
215 BigInteger result = aNumber.subtract(bNumber); in testCase9()
236 BigInteger result = aNumber.subtract(bNumber); in testCase10()
[all …]
DBigIntegerHashCodeTest.java42 aNumber1.subtract(aNumber2).shiftRight(125); in testSameObject()
DBigDecimalTest.java745 BigDecimal result = sub1.subtract(sub2); in test_subtractLjava_math_BigDecimal()
749 BigDecimal result2 = sub2.subtract(sub1); in test_subtractLjava_math_BigDecimal()
757 result = sub1.subtract(sub2); in test_subtractLjava_math_BigDecimal()
761 result = sub1.subtract(sub2); in test_subtractLjava_math_BigDecimal()
766 result = sub1.subtract(sub2); in test_subtractLjava_math_BigDecimal()
DBigIntegerTest.java106 .setBit(16).subtract(two))); in test_Constructor$B()
120 .setBit(16).subtract(two))); in test_ConstructorI$B()
123 .setBit(16).subtract(two).negate())); in test_ConstructorI$B()
457 assertTrue(">>1 == /2", f.subtract(one).divide(two).equals(e)); in test_shiftRightI()
932 || r.equals(mod.subtract(i2))); in testDiv()
943 BigInteger k = j.subtract(two); in testDivRanges()
DOldBigIntegerTest.java209 BigInteger wpMinusOne = wp.subtract(BigInteger.ONE); in largePrimesProduct()
/libcore/luni/src/test/java/libcore/java/math/
DBigDecimalTest.java93 assertEquals(0, a.subtract(b).signum()); in testPrecisionFromString()
260 assertEquals("a - (-b)", expectedSumAsString, bigA.subtract(bigMinusB).toString()); in assertSum()
261 assertEquals("b - (-a)", expectedSumAsString, bigB.subtract(bigMinusA).toString()); in assertSum()
336 assertEquals(bigHalfValue, bigValue.subtract(bigHalfValue)); in checkCommonOperations()
DOldBigDecimalArithmeticTest.java61 a.round(mc).subtract(b.round(mc)).toString()); in testSubtractMathContextNonTrivial()
62 res = a.subtract(b, mc); in testSubtractMathContextNonTrivial()
70 res = a.subtract(b, mc); in testSubtractMathContextNonTrivial()
/libcore/luni/src/test/java/libcore/java/lang/
DMathTest.java147 BigInteger expected = BigInteger.valueOf(a).subtract(BigInteger.valueOf(b)); in testSubtractExactL()
180 BigInteger expected = BigInteger.valueOf(a).subtract(BigInteger.ONE); in testDecrementExactL()
DStrictMathTest.java108 BigInteger expected = BigInteger.valueOf(a).subtract(BigInteger.valueOf(b)); in testSubtractExactL()
DLongTest.java186 BigInteger.valueOf(2).shiftLeft(63).subtract(BigInteger.ONE)
/libcore/ojluni/src/test/java/lang/Math/
DExactArithTests.java244 resultBig = xBig.subtract(yBig); in testLongExact()
277 resultBig = xBig.subtract(BigInteger.ONE); in testLongExact()
DDivModTests.java230 resultD = xD.subtract(resultD); in testLongFloorMod()
335 resultD = xD.subtract(resultD); in testLongIntFloorMod()
/libcore/ojluni/src/main/java/sun/security/util/
DObjectIdentifier.java375 BigInteger second = big.subtract(BigInteger.valueOf(80)); in toIntArray()
442 sb.append(big.subtract(BigInteger.valueOf(80))); in toString()
/libcore/luni/src/main/java/javax/xml/datatype/
DDuration.java613 public Duration subtract(final Duration rhs) { in subtract() method in Duration
/libcore/jsr166-tests/src/test/java/jsr166/
DCompletableFutureTest.java431 static Integer subtract(Integer x, Integer y) {
443 value = subtract(x, y);
453 return value = subtract(x, y);
491 value = subtract(x, y);
513 value = subtract(x, y);
1626 checkCompletedNormally(h1, subtract(w1, w1)); in testThenCombine_normalCompletion()
1627 checkCompletedNormally(h3, subtract(w1, w1)); in testThenCombine_normalCompletion()
1628 rs[1].assertValue(subtract(w1, w1)); in testThenCombine_normalCompletion()
1629 rs[3].assertValue(subtract(w1, w1)); in testThenCombine_normalCompletion()
1633 checkCompletedNormally(h0, subtract(v1, v2)); in testThenCombine_normalCompletion()
[all …]
/libcore/luni/src/test/java/libcore/java/text/
DNumberFormatTest.java66 … assertEquals("double", nf.format(BigInteger.valueOf(Long.MIN_VALUE).subtract(BigInteger.ONE))); in test_small_BigInteger_gets_longValue()
/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java219 resultBig = xBig.subtract(yBig); in testLongExact()
/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKPeriod.java779 public void test_minus_TemporalAmount(Period base, Period subtract, Period expected) { in test_minus_TemporalAmount() argument
780 assertEquals(base.minus(subtract), expected); in test_minus_TemporalAmount()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatTest.java639 bigDecimal = new BigDecimal(Float.MIN_VALUE).subtract(new BigDecimal(Float.MIN_VALUE)); in test_formatObject()