Home
last modified time | relevance | path

Searched refs:multiplyExact (Results 1 – 20 of 20) sorted by relevance

/libcore/ojluni/src/main/java/java/lang/
DStrictMath.java797 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()
DMath.java900 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/
DChronoLocalDateImpl.java203 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()
DChronoLocalDateTimeImpl.java379 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()
DChronoPeriodImpl.java221 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/
DDuration.java175 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 …]
DInstant.java851 … 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()
DPeriod.java203 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()
DLocalDateTime.java1694 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()
DYear.java706 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()
DYearMonth.java804 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()
DLocalDate.java1236 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/
DCopticDate.java264 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/
DExactArithTests.java134 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/
DExactArithTests.java110 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/
DStrictMathTest.java69 assertEquals(expected, StrictMath.multiplyExact(a, b)); in testMultiplyExactI()
121 assertEquals(expected, BigInteger.valueOf(StrictMath.multiplyExact(a, b))); in testMultiplyExactL()
DMathTest.java72 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/
DWeekFields.java963 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()
DIsoFields.java355 … date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoyLong, 1), 3)); in resolve()
/libcore/ojluni/src/main/java/java/util/
DGregorianCalendar.java3461 cal.setTimeInMillis(Math.addExact(Math.multiplyExact(zdt.toEpochSecond(), 1000), in from()