/libcore/luni/src/main/java/libcore/util/ |
D | FP16.java | 208 public static int compare(short x, short y) { in compare() argument 209 if (less(x, y)) return -1; in compare() 210 if (greater(x, y)) return 1; in compare() 216 short yBits = isNaN(y) ? NaN : y; in compare() 390 public static short min(short x, short y) { in min() argument 392 if (isNaN(y)) return NaN; in min() 394 if ((x & EXPONENT_SIGNIFICAND_MASK) == 0 && (y & EXPONENT_SIGNIFICAND_MASK) == 0) { in min() 395 return (x & SIGN_MASK) != 0 ? x : y; in min() 399 ((y & SIGN_MASK) != 0 ? 0x8000 - (y & 0xffff) : y & 0xffff) ? x : y; in min() 416 public static short max(short x, short y) { in max() argument [all …]
|
/libcore/ojluni/src/main/java/java/security/spec/ |
D | ECPoint.java | 42 private final BigInteger y; field in ECPoint 52 this.y = null; in ECPoint() 63 public ECPoint(BigInteger x, BigInteger y) { in ECPoint() argument 64 if ((x==null) || (y==null)) { in ECPoint() 68 this.y = y; in ECPoint() 86 return y; in getAffineY() 101 (y.equals(((ECPoint)obj).y))); in equals() 112 return x.hashCode() << 5 + y.hashCode(); in hashCode()
|
D | DSAPublicKeySpec.java | 47 private BigInteger y; field in DSAPublicKeySpec 63 public DSAPublicKeySpec(BigInteger y, BigInteger p, BigInteger q, in DSAPublicKeySpec() argument 65 this.y = y; in DSAPublicKeySpec() 77 return this.y; in getY()
|
/libcore/luni/src/test/java/libcore/java/util/function/ |
D | BiPredicateTest.java | 37 … (x, y) -> { alwaysTrueInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testAnd() 39 …(x, y) -> { alwaysTrue2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testAnd() 41 …(x, y) -> { alwaysFalseInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false; … in testAnd() 43 …(x, y) -> { alwaysFalse2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false;… in testAnd() 67 BiPredicate<Object, Object> alwaysTrue = (x, y) -> true; in testAnd_null() 78 (x, y) -> { assertSame(arg1, x); assertSame(arg2, y); return true; }; in testNegate() 82 (x, y) -> { assertSame(arg1, x); assertSame(arg2, y); return false; }; in testNegate() 97 … (x, y) -> { alwaysTrueInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testOr() 99 …(x, y) -> { alwaysTrue2Invoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return true; }; in testOr() 101 …(x, y) -> { alwaysFalseInvoked.set(true); assertSame(arg1, x); assertSame(arg2, y); return false; … in testOr() [all …]
|
D | BiFunctionTest.java | 27 BiFunction<Integer, Integer, Integer> add = (x, y) -> x + y; in testAndThen() 33 BiFunction<Integer, Integer, Integer> add = (x, y) -> x + y; in testAndThen_nullFunction() 41 BiFunction<Integer, Integer, Integer> toNull = (x, y) -> null; in testAndThen_nullResult()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 509 public static native double atan2(double y, double x); in atan2() argument 723 public static int addExact(int x, int y) { in addExact() argument 724 return Math.addExact(x, y); in addExact() 738 public static long addExact(long x, long y) { in addExact() argument 739 return Math.addExact(x, y); in addExact() 753 public static int subtractExact(int x, int y) { in subtractExact() argument 754 return Math.subtractExact(x, y); in subtractExact() 768 public static long subtractExact(long x, long y) { in subtractExact() argument 769 return Math.subtractExact(x, y); in subtractExact() 783 public static int multiplyExact(int x, int y) { in multiplyExact() argument [all …]
|
D | Math.java | 507 public static native double atan2(double y, double x); in atan2() argument 809 public static int addExact(int x, int y) { in addExact() argument 810 int r = x + y; in addExact() 812 if (((x ^ r) & (y ^ r)) < 0) { in addExact() 828 public static long addExact(long x, long y) { in addExact() argument 829 long r = x + y; in addExact() 831 if (((x ^ r) & (y ^ r)) < 0) { in addExact() 847 public static int subtractExact(int x, int y) { in subtractExact() argument 848 int r = x - y; in subtractExact() 851 if (((x ^ y) & (x ^ r)) < 0) { in subtractExact() [all …]
|
D | Long.java | 1256 public static int compare(long x, long y) { in compare() argument 1257 return (x < y) ? -1 : ((x == y) ? 0 : 1); in compare() 1272 public static int compareUnsigned(long x, long y) { in compareUnsigned() argument 1273 return compare(x + MIN_VALUE, y + MIN_VALUE); in compareUnsigned() 1452 int x, y; in numberOfTrailingZeros() local 1455 y = (int)i; if (y != 0) { n = n -32; x = y; } else x = (int)(i>>>32); in numberOfTrailingZeros() 1456 y = x <<16; if (y != 0) { n = n -16; x = y; } in numberOfTrailingZeros() 1457 y = x << 8; if (y != 0) { n = n - 8; x = y; } in numberOfTrailingZeros() 1458 y = x << 4; if (y != 0) { n = n - 4; x = y; } in numberOfTrailingZeros() 1459 y = x << 2; if (y != 0) { n = n - 2; x = y; } in numberOfTrailingZeros()
|
D | Integer.java | 1268 public static int compare(int x, int y) { 1269 return (x < y) ? -1 : ((x == y) ? 0 : 1); 1284 public static int compareUnsigned(int x, int y) { 1285 return compare(x + MIN_VALUE, y + MIN_VALUE); 1459 int y; in numberOfTrailingZeros() local 1462 y = i <<16; if (y != 0) { n = n -16; i = y; } in numberOfTrailingZeros() 1463 y = i << 8; if (y != 0) { n = n - 8; i = y; } in numberOfTrailingZeros() 1464 y = i << 4; if (y != 0) { n = n - 4; i = y; } in numberOfTrailingZeros() 1465 y = i << 2; if (y != 0) { n = n - 2; i = y; } in numberOfTrailingZeros()
|
/libcore/luni/src/main/native/ |
D | java_lang_StringToReal.cpp | 273 uint64_t* y; in doubleAlgorithm() local 278 x = y = D = D2 = 0; in doubleAlgorithm() 289 free(y); in doubleAlgorithm() 292 y = D = D2 = NULL; in doubleAlgorithm() 303 allocateU64 (y, yLength); in doubleAlgorithm() 304 memset (y + 1, 0, sizeof (uint64_t) * (yLength - 1)); in doubleAlgorithm() 305 *y = m; in doubleAlgorithm() 306 simpleShiftLeftHighPrecision (y, yLength, k); in doubleAlgorithm() 318 allocateU64 (y, 1); in doubleAlgorithm() 319 *y = m; in doubleAlgorithm() [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | CalendarUtils.java | 135 public static final long mod(long x, long y) { in mod() argument 136 return (x - y * floorDivide(x, y)); in mod() 139 public static final int mod(int x, int y) { in mod() argument 140 return (x - y * floorDivide(x, y)); in mod() 143 public static final int amod(int x, int y) { in amod() argument 144 int z = mod(x, y); in amod() 145 return (z == 0) ? y : z; in amod() 148 public static final long amod(long x, long y) { in amod() argument 149 long z = mod(x, y); in amod() 150 return (z == 0) ? y : z; in amod()
|
/libcore/ojluni/annotations/mmodule/java/lang/ |
D | Math.annotated.java | 71 public static native double atan2(double y, double x); in atan2() argument 84 public static int addExact(int x, int y) { throw new RuntimeException("Stub!"); } in addExact() argument 86 public static long addExact(long x, long y) { throw new RuntimeException("Stub!"); } in addExact() argument 88 public static int subtractExact(int x, int y) { throw new RuntimeException("Stub!"); } in subtractExact() argument 90 public static long subtractExact(long x, long y) { throw new RuntimeException("Stub!"); } in subtractExact() argument 92 public static int multiplyExact(int x, int y) { throw new RuntimeException("Stub!"); } in multiplyExact() argument 94 public static long multiplyExact(long x, long y) { throw new RuntimeException("Stub!"); } in multiplyExact() argument 110 public static int floorDiv(int x, int y) { throw new RuntimeException("Stub!"); } in floorDiv() argument 112 public static long floorDiv(long x, long y) { throw new RuntimeException("Stub!"); } in floorDiv() argument 114 public static int floorMod(int x, int y) { throw new RuntimeException("Stub!"); } in floorMod() argument [all …]
|
/libcore/benchmarks/src/benchmarks/regression/ |
D | BigIntegerBenchmark.java | 26 BigInteger y = new BigInteger(1024, r); in timeRandomDivision() local 28 x.divide(y); in timeRandomDivision() 35 BigInteger y = new BigInteger(1024, r); in timeRandomGcd() local 37 x.gcd(y); in timeRandomGcd() 44 BigInteger y = new BigInteger(1024, r); in timeRandomMultiplication() local 46 x.multiply(y); in timeRandomMultiplication()
|
/libcore/ojluni/src/main/java/javax/crypto/spec/ |
D | DHPublicKeySpec.java | 46 private BigInteger y; field in DHPublicKeySpec 61 public DHPublicKeySpec(BigInteger y, BigInteger p, BigInteger g) { in DHPublicKeySpec() argument 62 this.y = y; in DHPublicKeySpec() 73 return this.y; in getY()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | ArraysTest.java | 282 Arrays.parallelPrefix(list, (x, y) -> x + y); in parallelPrefix$I() 292 Arrays.parallelPrefix((int[]) null, (x, y) -> x + y); in parallelPrefix$I() 318 Arrays.parallelPrefix(list, begin, end, (x, y) -> x + y); in parallelPrefix$III() 328 Arrays.parallelPrefix((int[]) null, begin, end, (x, y) -> x + y); in parallelPrefix$III() 334 Arrays.parallelPrefix(list, end, begin, (x, y) -> x + y); in parallelPrefix$III() 359 Arrays.parallelPrefix(list, (x, y) -> x + y); in parallelPrefix$L() 369 Arrays.parallelPrefix((long[]) null, (x, y) -> x + y); in parallelPrefix$L() 395 Arrays.parallelPrefix(list, begin, end, (x, y) -> x + y); in parallelPrefix$LII() 405 Arrays.parallelPrefix((long[]) null, begin, end, (x, y) -> x + y); in parallelPrefix$LII() 411 Arrays.parallelPrefix(list, end, begin, (x, y) -> x + y); in parallelPrefix$LII() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | ConcurrentHashMap8Test.java | 96 map.computeIfPresent(six, (x, y) -> "Z"); in testComputeIfPresent() 105 assertEquals("Z", map.computeIfPresent(one, (x, y) -> "Z")); in testComputeIfPresent2() 113 map.compute(six, (x, y) -> null); in testCompute() 122 assertEquals("Z", map.compute(six, (x, y) -> "Z")); in testCompute2() 130 assertEquals("Z", map.compute(one, (x, y) -> "Z")); in testCompute3() 138 map.compute(one, (x, y) -> null); in testCompute4() 147 assertEquals("Y", map.merge(six, "Y", (x, y) -> "Z")); in testMerge1() 155 assertEquals("Z", map.merge(one, "Y", (x, y) -> "Z")); in testMerge2() 163 map.merge(one, "Y", (x, y) -> null); in testMerge3() 192 map.replaceAll((x, y) -> { return x > 3 ? "Z" : y; }); in testReplaceAll() argument [all …]
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | LambdaTestHelpers.java | 62 public static final BiConsumer bBiEmpty = (x,y) -> { }; 66 public static final BiConsumer bBiHashCode = (x,y) -> { Objects.hash(x, y); }; 97 public static final BinaryOperator<Integer> rPlus = (x, y) -> x+y; 98 public static final BinaryOperator<Integer> rMax = (x, y) -> Math.max(x, y); 99 public static final BinaryOperator<Integer> rMin = (x, y) -> Math.min(x,y); 100 public static final IntBinaryOperator irPlus = (x, y) -> x+y; 101 public static final IntBinaryOperator irMax = (x, y) -> Math.max(x, y); 102 public static final IntBinaryOperator irMin = (x, y) -> Math.min(x,y); 104 public static final LongBinaryOperator lrPlus = (x, y) -> x+y; 105 public static final DoubleBinaryOperator drPlus = (x, y) -> x+y; [all …]
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | LambdaTestHelpers.java | 63 public static final BiConsumer bBiEmpty = (x,y) -> { }; 67 public static final BiConsumer bBiHashCode = (x,y) -> { Objects.hash(x, y); }; 98 public static final BinaryOperator<Integer> rPlus = (x, y) -> x+y; 99 public static final BinaryOperator<Integer> rMax = (x, y) -> Math.max(x, y); 100 public static final BinaryOperator<Integer> rMin = (x, y) -> Math.min(x,y); 101 public static final IntBinaryOperator irPlus = (x, y) -> x+y; 102 public static final IntBinaryOperator irMax = (x, y) -> Math.max(x, y); 103 public static final IntBinaryOperator irMin = (x, y) -> Math.min(x,y); 105 public static final LongBinaryOperator lrPlus = (x, y) -> x+y; 106 public static final DoubleBinaryOperator drPlus = (x, y) -> x+y; [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 244 int y = year + 1900; in Date() local 247 y += month / 12; in Date() 250 y += CalendarUtils.floorDivide(month, 12); in Date() 253 BaseCalendar cal = getCalendarSystem(y); in Date() 255 cdate.setNormalizedDate(y, month + 1, date).setTimeOfDay(hrs, min, sec, 0); in Date() 319 int y = year + 1900; in UTC() local 322 y += month / 12; in UTC() 325 y += CalendarUtils.floorDivide(month, 12); in UTC() 329 BaseCalendar cal = getCalendarSystem(y); in UTC() 331 udate.setNormalizedDate(y, m, date).setTimeOfDay(hrs, min, sec, 0); in UTC() [all …]
|
/libcore/luni/src/test/java/libcore/java/lang/invoke/ |
D | CallSitesTest.java | 107 int y = (int) site.getTarget().invokeExact(2, 6); in commonMutableCallSitesTest() local 108 assertEquals(8, y); in commonMutableCallSitesTest() 136 private static int add2(int x, int y) { in add2() argument 137 return x + y; in add2() 140 private static int add3(int x, int y, int z) { in add3() argument 141 return x + y + z; in add3() 144 private static int sub2(int x, int y) { in sub2() argument 145 return x - y; in sub2()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | CalendarUtils.java | 62 public static final long mod(long x, long y) { in mod() argument 67 public static final int mod(int x, int y) { in mod() argument 71 public static final int amod(int x, int y) { in amod() argument 75 public static final long amod(long x, long y) { in amod() argument
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 552 int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR); in resolveYMD() local 556 return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS); in resolveYMD() 563 return date(y, moy, dom); in resolveYMD() 565 return date(y, moy, 1).with(TemporalAdjusters.lastDayOfMonth()); in resolveYMD() 568 return date(y, moy, dom); in resolveYMD() 572 int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR); in resolveYD() local 575 return dateYearDay(y, 1).plus(days, DAYS); in resolveYD() 578 return dateYearDay(y, doy); // smart is same as strict in resolveYD() 582 int y = range(YEAR).checkValidIntValue(fieldValues.remove(YEAR), YEAR); in resolveYMAA() local 587 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS); in resolveYMAA() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKIsoChronology.java | 346 …public void test_resolve_yearOfEra(ResolverStyle style, Integer e, Integer yoe, Integer y, ChronoF… in test_resolve_yearOfEra() argument 354 if (y != null) { in test_resolve_yearOfEra() 355 fieldValues.put(ChronoField.YEAR, (long) y); in test_resolve_yearOfEra() 434 …public void test_resolve_ymd_lenient(int y, int m, int d, LocalDate expected, Object smart, boolea… in test_resolve_ymd_lenient() argument 436 fieldValues.put(ChronoField.YEAR, (long) y); in test_resolve_ymd_lenient() 445 …public void test_resolve_ymd_smart(int y, int m, int d, LocalDate expected, Object smart, boolean … in test_resolve_ymd_smart() argument 447 fieldValues.put(ChronoField.YEAR, (long) y); in test_resolve_ymd_smart() 468 …public void test_resolve_ymd_strict(int y, int m, int d, LocalDate expected, Object smart, boolean… in test_resolve_ymd_strict() argument 470 fieldValues.put(ChronoField.YEAR, (long) y); in test_resolve_ymd_strict() 518 …public void test_resolve_yd_lenient(int y, int d, LocalDate expected, boolean smart, boolean stric… in test_resolve_yd_lenient() argument [all …]
|
/libcore/ojluni/src/main/java/java/nio/ |
D | DoubleBuffer.java | 806 private static boolean equals(double x, double y) { in equals() argument 808 return (x == y) || (Double.isNaN(x) && Double.isNaN(y)); in equals() 843 private static int compare(double x, double y) { in compare() argument 845 return ((x < y) ? -1 : in compare() 846 (x > y) ? +1 : in compare() 847 (x == y) ? 0 : in compare() 848 Double.isNaN(x) ? (Double.isNaN(y) ? 0 : +1) : -1); in compare()
|
D | FloatBuffer.java | 806 private static boolean equals(float x, float y) { in equals() argument 808 return (x == y) || (Float.isNaN(x) && Float.isNaN(y)); in equals() 846 private static int compare(float x, float y) { in compare() argument 848 return ((x < y) ? -1 : in compare() 849 (x > y) ? +1 : in compare() 850 (x == y) ? 0 : in compare() 851 Float.isNaN(x) ? (Float.isNaN(y) ? 0 : +1) : -1); in compare()
|