Home
last modified time | relevance | path

Searched refs:negate (Results 1 – 25 of 31) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerTest.java123 .setBit(16).subtract(two).negate())); in test_ConstructorI$B()
219 assertTrue("bi3=copy of bi3", bi3.equals(bi3.negate().negate())); in test_equalsLjava_lang_Object()
231 two.negate().compareTo(one) < 0); in test_compareToLjava_math_BigInteger()
267 .add(aZillion.negate()).equals(aZillion)); in test_addLjava_math_BigInteger()
302 .negate().equals(zero)); in test_negate()
304 !aZillion.negate().equals(aZillion)); in test_negate()
306 aZillion.negate().negate().equals(aZillion)); in test_negate()
308 assertTrue("0.neg", zero.negate().equals(zero)); in test_negate()
309 assertTrue("1.neg", one.negate().equals(minusOne)); in test_negate()
310 assertTrue("2.neg", two.negate().equals(minusTwo)); in test_negate()
[all …]
DBigDecimalTest.java372 hash2 = new BigDecimal(value.negate(), 2); in test_hashCode()
400 BigDecimal long1 = new BigDecimal(value2.negate(), 0); in test_longValue()
453 movePtLeft = new BigDecimal(value2.negate(), 0); in test_movePointLeftI()
541 .negate().toString().equals("-1233.4560000")); in test_negate()
543 assertTrue("the negate of -23465839 is not 23465839", negate1.negate() in test_negate()
546 assertTrue("the negate of -3.456E6 is not 3.456E6", negate1.negate() in test_negate()
547 .negate().equals(negate1)); in test_negate()
616 BigDecimal setNeg = new BigDecimal(value.negate(), 4); in test_setScaleII()
754 result.equals(result2.negate())); in test_subtractLjava_math_BigDecimal()
DBigDecimalCompareTest.java424 assertEquals("incorrect value", cNumber, aNumber.negate()); in testNegatePositive()
439 BigDecimal res = aNumber.negate(mc); in testNegateMathContextPositive()
454 assertEquals("incorrect value", cNumber, aNumber.negate()); in testNegateNegative()
469 BigDecimal res = aNumber.negate(mc); in testNegateMathContextNegative()
DBigIntegerCompareTest.java465 BigInteger result = aNumber.negate(); in testNegatePositive()
482 BigInteger result = aNumber.negate(); in testNegateNegative()
497 BigInteger result = aNumber.negate(); in testNegateZero()
DOldBigIntegerTest.java295 .add(aZillion.negate()).equals(aZillion)); in test_addLjava_math_BigInteger()
/libcore/luni/src/test/java/libcore/java/math/
DBigIntegerTest.java204 assertEquals(result, arg1.negate().gcd(arg2)); in try_gcd_variants()
205 assertEquals(result, arg2.gcd(arg1.negate())); in try_gcd_variants()
206 assertEquals(result, arg1.gcd(arg2.negate())); in try_gcd_variants()
207 assertEquals(result, arg2.negate().gcd(arg1)); in try_gcd_variants()
208 assertEquals(result, arg1.negate().gcd(arg2.negate())); in try_gcd_variants()
209 assertEquals(result, arg2.negate().gcd(arg1.negate())); in try_gcd_variants()
246 BigInteger.ONE.negate().shiftLeft(1000).byteValueExact(); in test_byteValueExact()
267 BigInteger.ONE.negate().shiftLeft(1000).shortValueExact(); in test_shortValueExact()
288 BigInteger.ONE.negate().shiftLeft(1000).intValueExact(); in test_intValueExact()
312 BigInteger.ONE.negate().shiftLeft(1000).longValueExact(); in test_longValueExact()
DOldBigDecimalCompareTest.java59 BigDecimal res = aNumber.negate(mc); in testNegateMathContextPositive()
DBigDecimalTest.java223 assertEquals(a.negate(), b); in checkNegate()
224 assertEquals(a, b.negate()); in checkNegate()
225 assertEquals(a, a.negate().negate()); in checkNegate()
DOldBigDecimalTest.java94 BigDecimal setNeg = new BigDecimal(value.negate(), 4); in test_setScaleILjava_math_RoundingMode()
/libcore/ojluni/src/main/java/java/time/
DPeriod.java326 int negate = ("-".equals(matcher.group(1)) ? -1 : 1); in parse() local
333 int years = parseNumber(text, yearMatch, negate); in parse()
334 int months = parseNumber(text, monthMatch, negate); in parse()
335 int weeks = parseNumber(text, weekMatch, negate); in parse()
336 int days = parseNumber(text, dayMatch, negate); in parse()
347 private static int parseNumber(CharSequence text, String str, int negate) { in parseNumber() argument
353 return Math.multiplyExact(val, negate); in parseNumber()
DDuration.java388 boolean negate = "-".equals(matcher.group(1)); in parse()
401 return create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos); in parse()
424 private static int parseFraction(CharSequence text, String parsed, int negate) { in parseFraction() argument
431 return Integer.parseInt(parsed) * negate; in parseFraction()
437 …private static Duration create(boolean negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs,… in create() argument
439 if (negate) { in create()
/libcore/ojluni/src/main/java/java/util/function/
DDoublePredicate.java80 default DoublePredicate negate() { in negate() method
DIntPredicate.java80 default IntPredicate negate() { in negate() method
DLongPredicate.java80 default LongPredicate negate() { in negate() method
DPredicate.java79 default Predicate<T> negate() { in negate() method
DBiPredicate.java83 default BiPredicate<T, U> negate() { in negate() method
/libcore/luni/src/test/java/libcore/java/util/function/
DLongPredicateTest.java71 assertFalse(alwaysTrue.negate().test(arg)); in testNegate()
74 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
DDoublePredicateTest.java77 assertFalse(alwaysTrue.negate().test(arg)); in testNegate()
80 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
DPredicateTest.java77 assertFalse(alwaysTrue.negate().test(null)); in testNegate()
80 assertTrue(alwaysFalse.negate().test(null)); in testNegate()
DIntPredicateTest.java77 assertFalse(alwaysTrue.negate().test(arg)); in testNegate()
80 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
DBiPredicateTest.java79 assertFalse(alwaysTrue.negate().test(arg1, arg2)); in testNegate()
83 assertTrue(alwaysFalse.negate().test(arg1, arg2)); in testNegate()
/libcore/luni/src/main/java/javax/xml/datatype/
DDuration.java614 return add(rhs.negate()); in subtract()
698 public abstract Duration negate(); in negate() method in Duration
/libcore/luni/src/test/java/libcore/java/util/
DRemoveIfTester.java33 private static final Predicate<Integer> isOdd = isEven.negate();
/libcore/ojluni/annotations/hiddenapi/java/time/
DDuration.java126 java.lang.CharSequence text, java.lang.String parsed, int negate) { in parseFraction() argument
131 boolean negate, in create() argument
/libcore/ojluni/src/main/java/java/math/
DBigDecimal.java1441 … return add(this.intCompact, this.scale, subtrahend.intVal.negate(), subtrahend.scale); in subtract()
1450 return add(this.intVal, this.scale, subtrahend.intVal.negate(), subtrahend.scale); in subtract()
1473 return add(subtrahend.negate(), mc); in subtract()
2118 return (signum() < 0 ? negate() : this); in abs()
2133 return (signum() < 0 ? negate(mc) : plus(mc)); in abs()
2142 public BigDecimal negate() { in negate() method in BigDecimal
2144 return new BigDecimal(intVal.negate(), INFLATED, scale, precision); in negate()
2160 public BigDecimal negate(MathContext mc) { in negate() method in BigDecimal
2161 return negate().plus(mc); in negate()
4955 unscaledVal = unscaledVal.negate();

12