/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 797 public static int multiplyExact(int x, int y) { in multiplyExact() method in StrictMath 798 return Math.multiplyExact(x, y); in multiplyExact() 812 public static long multiplyExact(long x, int y) { in multiplyExact() method in StrictMath 813 return Math.multiplyExact(x, y); in multiplyExact() 827 public static long multiplyExact(long x, long y) { in multiplyExact() method in StrictMath 828 return Math.multiplyExact(x, y); in multiplyExact()
|
D | Math.java | 900 public static int multiplyExact(int x, int y) { in multiplyExact() method in Math 918 public static long multiplyExact(long x, int y) { in multiplyExact() method in Math 919 return multiplyExact(x, (long)y); in multiplyExact() 932 public static long multiplyExact(long x, long y) { in multiplyExact() method in Math
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | ChronoLocalDateImpl.java | 203 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus() 206 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus() 207 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus() 208 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus() 277 return plusDays(Math.multiplyExact(weeksToAdd, 7)); in plusWeeks()
|
D | ChronoLocalDateTimeImpl.java | 379 case NANOS: amount = Math.multiplyExact(amount, NANOS_PER_DAY); break; in until() 380 case MICROS: amount = Math.multiplyExact(amount, MICROS_PER_DAY); break; in until() 381 case MILLIS: amount = Math.multiplyExact(amount, MILLIS_PER_DAY); break; in until() 382 case SECONDS: amount = Math.multiplyExact(amount, SECONDS_PER_DAY); break; in until() 383 case MINUTES: amount = Math.multiplyExact(amount, MINUTES_PER_DAY); break; in until() 384 case HOURS: amount = Math.multiplyExact(amount, HOURS_PER_DAY); break; in until() 385 case HALF_DAYS: amount = Math.multiplyExact(amount, 2); break; in until()
|
D | ChronoPeriodImpl.java | 221 Math.multiplyExact(years, scalar), in multipliedBy() 222 Math.multiplyExact(months, scalar), in multipliedBy() 223 Math.multiplyExact(days, scalar)); in multipliedBy()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Duration.java | 175 return create(Math.multiplyExact(days, SECONDS_PER_DAY), 0); in ofDays() 190 return create(Math.multiplyExact(hours, SECONDS_PER_HOUR), 0); in ofHours() 205 return create(Math.multiplyExact(minutes, SECONDS_PER_MINUTE), 0); in ofMinutes() 418 return Math.multiplyExact(val, multiplier); in parseNumber() 694 return plus(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY), 0); in plus() 709 return plusSeconds(Math.multiplyExact(unit.getDuration().seconds, amountToAdd)); in plus() 729 return plus(Math.multiplyExact(daysToAdd, SECONDS_PER_DAY), 0); in plusDays() 742 return plus(Math.multiplyExact(hoursToAdd, SECONDS_PER_HOUR), 0); in plusHours() 755 return plus(Math.multiplyExact(minutesToAdd, SECONDS_PER_MINUTE), 0); in plusMinutes() 1199 long millis = Math.multiplyExact(seconds, 1000); in toMillis() [all …]
|
D | Instant.java | 851 … case MINUTES: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_MINUTE)); in plus() 852 case HOURS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_HOUR)); in plus() 853 … case HALF_DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY / 2)); in plus() 854 case DAYS: return plusSeconds(Math.multiplyExact(amountToAdd, SECONDS_PER_DAY)); in plus() 1158 long totalNanos = Math.multiplyExact(secsDiff, NANOS_PER_SECOND); in nanosUntil() 1227 long millis = Math.multiplyExact(seconds+1, 1000); in toEpochMilli() 1231 long millis = Math.multiplyExact(seconds, 1000); in toEpochMilli()
|
D | Period.java | 203 return create(0, 0, Math.multiplyExact(weeks, 7)); in ofWeeks() 337 days = Math.addExact(days, Math.multiplyExact(weeks, 7)); in parse() 353 return Math.multiplyExact(val, negate); in parseNumber() 787 Math.multiplyExact(years, scalar), in multipliedBy() 788 Math.multiplyExact(months, scalar), in multipliedBy() 789 Math.multiplyExact(days, scalar)); in multipliedBy()
|
D | LocalDateTime.java | 1694 amount = Math.multiplyExact(amount, NANOS_PER_DAY); in until() 1697 amount = Math.multiplyExact(amount, MICROS_PER_DAY); in until() 1701 amount = Math.multiplyExact(amount, MILLIS_PER_DAY); in until() 1705 amount = Math.multiplyExact(amount, SECONDS_PER_DAY); in until() 1709 amount = Math.multiplyExact(amount, MINUTES_PER_DAY); in until() 1713 amount = Math.multiplyExact(amount, HOURS_PER_DAY); in until() 1717 amount = Math.multiplyExact(amount, 2); in until()
|
D | Year.java | 706 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus() 707 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus() 708 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
|
D | YearMonth.java | 804 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus() 805 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus() 806 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus()
|
D | LocalDate.java | 1236 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus() 1237 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus() 1238 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus() 1322 return plusDays(Math.multiplyExact(weeksToAdd, 7)); in plusWeeks()
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticDate.java | 264 case WEEKS: return plusDays(Math.multiplyExact(amountToAdd, 7)); in plus() 267 case DECADES: return plusYears(Math.multiplyExact(amountToAdd, 10)); in plus() 268 case CENTURIES: return plusYears(Math.multiplyExact(amountToAdd, 100)); in plus() 269 case MILLENNIA: return plusYears(Math.multiplyExact(amountToAdd, 1000)); in plus() 278 return plusMonths(Math.multiplyExact(years, 13)); in plusYears()
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | ExactArithTests.java | 134 int product = StrictMath.multiplyExact(x, y); in testIntegerExact() 231 long product = StrictMath.multiplyExact(x, y); in testLongExact() 328 long product = StrictMath.multiplyExact(x, y); in testLongIntExact()
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | ExactArithTests.java | 110 int product = Math.multiplyExact(x, y); in testIntegerExact() 256 long product = Math.multiplyExact(x, y); in testLongExact() 385 long product = Math.multiplyExact(x, y); in testLongIntExact()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StrictMathTest.java | 69 assertEquals(expected, StrictMath.multiplyExact(a, b)); in testMultiplyExactI() 121 assertEquals(expected, BigInteger.valueOf(StrictMath.multiplyExact(a, b))); in testMultiplyExactL()
|
D | MathTest.java | 72 assertEquals(expected, Math.multiplyExact(a, b)); in testMultiplyExactI() 160 assertEquals(expected, BigInteger.valueOf(Math.multiplyExact(a, b))); in testMultiplyExactL()
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | WeekFields.java | 963 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoM() 988 date = date.plus(Math.addExact(Math.multiplyExact(weeks, 7), days), DAYS); in resolveWoY()
|
D | IsoFields.java | 355 … date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoyLong, 1), 3)); in resolve()
|
/libcore/ojluni/src/main/java/java/util/ |
D | GregorianCalendar.java | 3461 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from()
|