/libcore/ojluni/src/main/java/java/time/chrono/ |
D | AbstractChronology.java | 554 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD() 555 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD() 574 long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1); in resolveYD() 584 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMAA() 585 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAA() 586 long days = Math.subtractExact(fieldValues.remove(ALIGNED_DAY_OF_WEEK_IN_MONTH), 1); in resolveYMAA() 602 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMAD() 603 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_MONTH), 1); in resolveYMAD() 604 long dow = Math.subtractExact(fieldValues.remove(DAY_OF_WEEK), 1); in resolveYMAD() 620 long weeks = Math.subtractExact(fieldValues.remove(ALIGNED_WEEK_OF_YEAR), 1); in resolveYAA() [all …]
|
D | IsoChronology.java | 520 … addFieldValue(fieldValues, YEAR, (year > 0 ? yoeLong: Math.subtractExact(1, yoeLong))); in resolveYearOfEra() 527 …ieldValue(fieldValues, YEAR, (year == null || year > 0 ? yoeLong: Math.subtractExact(1, yoeLong))); in resolveYearOfEra() 532 addFieldValue(fieldValues, YEAR, Math.subtractExact(1, yoeLong)); in resolveYearOfEra() 546 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD() 547 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD()
|
D | ChronoPeriodImpl.java | 190 Math.subtractExact(years, amount.years), in minus() 191 Math.subtractExact(months, amount.months), in minus() 192 Math.subtractExact(days, amount.days)); in minus()
|
D | JapaneseChronology.java | 477 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1); in resolveYMD() 478 long days = Math.subtractExact(fieldValues.remove(DAY_OF_MONTH), 1); in resolveYMD() 510 long days = Math.subtractExact(fieldValues.remove(DAY_OF_YEAR), 1); in resolveYD()
|
/libcore/ojluni/src/main/java/java/lang/ |
D | StrictMath.java | 767 public static int subtractExact(int x, int y) { in subtractExact() method in StrictMath 768 return Math.subtractExact(x, y); in subtractExact() 782 public static long subtractExact(long x, long y) { in subtractExact() method in StrictMath 783 return Math.subtractExact(x, y); in subtractExact()
|
D | Math.java | 860 public static int subtractExact(int x, int y) { in subtractExact() method in Math 880 public static long subtractExact(long x, long y) { in subtractExact() method in Math
|
/libcore/ojluni/src/main/java/java/time/temporal/ |
D | JulianFields.java | 286 return (R) temporal.with(EPOCH_DAY, Math.subtractExact(newValue, offset)); in adjustInto() 296 return chrono.dateEpochDay(Math.subtractExact(value, offset)); in resolve()
|
D | IsoFields.java | 355 … date = LocalDate.of(y, 1, 1).plusMonths(Math.multiplyExact(Math.subtractExact(qoyLong, 1), 3)); in resolve() 356 doq = Math.subtractExact(doq, 1); in resolve() 464 return (R) temporal.plus(Math.subtractExact(newValue, getFrom(temporal)), WEEKS); in adjustInto() 484 date = date.plusWeeks(Math.subtractExact(dow, 7) / 7); in resolve() 487 date = date.plusWeeks(Math.subtractExact(wowby, 1)).with(DAY_OF_WEEK, dow); in resolve() 711 return Math.subtractExact(temporal2Exclusive.getLong(WEEK_BASED_YEAR), in between()
|
D | WeekFields.java | 960 date = chrono.date(year, 1, 1).plus(Math.subtractExact(month, 1), MONTHS); in resolveWoM() 961 long weeks = Math.subtractExact(wom, localizedWeekOfMonth(date)); in resolveWoM() 986 long weeks = Math.subtractExact(woy, localizedWeekOfYear(date)); in resolveWoY() 1012 long weeks = Math.subtractExact(wowby, 1); in resolveWBY()
|
/libcore/luni/src/test/java/libcore/java/lang/ |
D | StrictMathTest.java | 57 assertEquals(expected, StrictMath.subtractExact(a, b)); in testSubtractExactI() 110 assertEquals(expected, BigInteger.valueOf(StrictMath.subtractExact(a, b))); in testSubtractExactL()
|
D | MathTest.java | 60 assertEquals(expected, Math.subtractExact(a, b)); in testSubtractExactI() 149 assertEquals(expected, BigInteger.valueOf(Math.subtractExact(a, b))); in testSubtractExactL()
|
/libcore/ojluni/src/main/java/java/time/ |
D | Period.java | 711 Math.subtractExact(years, isoAmount.years), in minus() 712 Math.subtractExact(months, isoAmount.months), in minus() 713 Math.subtractExact(days, isoAmount.days)); in minus()
|
D | Instant.java | 1144 case MILLIS: return Math.subtractExact(end.toEpochMilli(), toEpochMilli()); in until() 1157 long secsDiff = Math.subtractExact(end.seconds, seconds); in nanosUntil() 1163 long secsDiff = Math.subtractExact(end.seconds, seconds); in secondsUntil()
|
/libcore/ojluni/src/test/java/lang/StrictMath/ |
D | ExactArithTests.java | 119 int diff = StrictMath.subtractExact(x, y); in testIntegerExact() 220 long diff = StrictMath.subtractExact(x, y); in testLongExact()
|
/libcore/ojluni/src/test/java/lang/Math/ |
D | ExactArithTests.java | 95 int diff = Math.subtractExact(x, y); in testIntegerExact() 245 long diff = Math.subtractExact(x, y); in testLongExact()
|