/libcore/ojluni/src/test/java/math/BigInteger/ |
D | CompareToTests.java | 43 final BigInteger MINUS_ONE = BigInteger.ONE.negate(); in compareToTests() 59 {TWO_POW_127.negate(), TWO_POW_127, MINUS_ONE}, in compareToTests() 62 {TWO_POW_128.or(TWO_POW_126), TWO_POW_128.negate(), ONE}, in compareToTests() 65 {TWO_POW_128.negate(), TWO_POW_128.or(TWO_POW_126), MINUS_ONE}, in compareToTests() 68 {TWO_POW_127.negate(), TWO_POW_128, MINUS_ONE}, in compareToTests() 71 {TWO_POW_128.negate(), TWO_POW_127, MINUS_ONE}, in compareToTests() 75 {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE}, in compareToTests() 78 {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE}, in compareToTests() 81 {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE}, in compareToTests() 84 {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MAX_VALUE), ZERO}, in compareToTests() [all …]
|
D | ModPow.java | 54 base = base.negate(); in testModPow()
|
D | ModInvTime.java | 46 BigInteger ns = s.negate(); in main()
|
/libcore/ojluni/src/test/java/math/BigDecimal/ |
D | CompareToTests.java | 43 final BigDecimal MINUS_ONE = BigDecimal.ONE.negate(); in compareToTests() 63 {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE}, in compareToTests() 66 {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MAX_VALUE), MINUS_ONE}, in compareToTests() 69 {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MAX_VALUE), ONE}, in compareToTests() 72 {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MAX_VALUE), ZERO}, in compareToTests() 75 {valueOf(Long.MAX_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 78 {valueOf(Long.MAX_VALUE-1).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 81 {valueOf(Long.MIN_VALUE).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 84 {valueOf(Long.MIN_VALUE+1).negate(), valueOf(Long.MIN_VALUE), ONE}, in compareToTests() 89 BigDecimal a_negate = a.negate(); in compareToTests() [all …]
|
D | ZeroScalingTests.java | 121 result = element.negate().add(zero, mc); in addTests() 123 result.compareTo(element.negate()) != 0, in addTests() 128 result = zero.add(element.negate(), mc); in addTests() 130 result.compareTo(element.negate()) != 0, in addTests() 190 result.compareTo(element.negate()) != 0, in subtractTests() 195 result = element.negate().subtract(zero, mc); in subtractTests() 197 result.compareTo(element.negate()) != 0, in subtractTests() 202 result = zero.subtract(element.negate(), mc); in subtractTests()
|
D | IntegralDivisionTests.java | 174 divideContextTest(dividend.negate(), divisor.negate(), expected, mc); in divideContextTests() 177 divideContextTest(dividend.negate(), divisor, expected.negate(), mc); in divideContextTests() 178 divideContextTest(dividend, divisor.negate(), expected.negate(), mc); in divideContextTests()
|
D | ScaleByPowerOfTenTests.java | 52 bd = BigDecimal.ONE.negate().scaleByPowerOfTen(i); in testScaleByPowerOfTen() 53 expected = new BigDecimal(BigInteger.ONE.negate(), -i); in testScaleByPowerOfTen()
|
D | NegateTests.java | 41 return bd.negate().plus(mc); in negateThenRound() 54 BigDecimal neg1 = bd.negate(mc); in negateTest()
|
D | StrippingZerosTest.java | 90 testCases[i][0] = testCases[i][0].negate(); in testStrippingZeros() 91 testCases[i][1] = testCases[i][1].negate(); in testStrippingZeros()
|
D | AddTests.java | 199 BigDecimal b1_negate = b1.negate(); in roundAway() 200 BigDecimal b2_negate = b2.negate(); in roundAway()
|
D | PrecisionTests.java | 54 testPrecision(bd.negate(), i); in testPrecision()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigIntegerTest.java | 123 .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 …]
|
D | BigDecimalTest.java | 372 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()
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | BigIntegerTest.java | 204 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()
|
/libcore/ojluni/src/main/java/java/util/function/ |
D | Predicate.java | 79 default Predicate<T> negate() { in negate() method 138 return (Predicate<T>)target.negate(); in not()
|
D | IntPredicate.java | 80 default IntPredicate negate() { in negate() method
|
D | LongPredicate.java | 80 default LongPredicate negate() { in negate() method
|
D | DoublePredicate.java | 80 default DoublePredicate negate() { in negate() method
|
D | BiPredicate.java | 83 default BiPredicate<T, U> negate() { in negate() method
|
/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 324 int negate = (charMatch(text, matcher.start(1), matcher.end(1), '-') ? -1 : 1); in parse() local 331 int years = parseNumber(text, yearStart, yearEnd, negate); in parse() 332 int months = parseNumber(text, monthStart, monthEnd, negate); in parse() 333 int weeks = parseNumber(text, weekStart, weekEnd, negate); in parse() 334 int days = parseNumber(text, dayStart, dayEnd, negate); in parse() 349 private static int parseNumber(CharSequence text, int start, int end, int negate) { in parseNumber() argument 355 return Math.multiplyExact(val, negate); in parseNumber()
|
D | Duration.java | 389 boolean negate = "-".equals(matcher.group(1)); in parse() 402 return create(negate, daysAsSecs, hoursAsSecs, minsAsSecs, seconds, nanos); in parse() 425 private static int parseFraction(CharSequence text, String parsed, int negate) { in parseFraction() argument 432 return Integer.parseInt(parsed) * negate; in parseFraction() 438 …private static Duration create(boolean negate, long daysAsSecs, long hoursAsSecs, long minsAsSecs,… in create() argument 440 if (negate) { in create()
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | LongPredicateTest.java | 71 assertFalse(alwaysTrue.negate().test(arg)); in testNegate() 74 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
|
D | IntPredicateTest.java | 77 assertFalse(alwaysTrue.negate().test(arg)); in testNegate() 80 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
|
D | DoublePredicateTest.java | 77 assertFalse(alwaysTrue.negate().test(arg)); in testNegate() 80 assertTrue(alwaysFalse.negate().test(arg)); in testNegate()
|
D | PredicateTest.java | 77 assertFalse(alwaysTrue.negate().test(null)); in testNegate() 80 assertTrue(alwaysFalse.negate().test(null)); in testNegate()
|