guava/src/com/google/common/math/LongMath.java
@GwtIncompatible // TODO
  public static long checkedSubtract(long a, long b) {
    long result = a - b;
    checkNoOverflow((a ^ b) >= 0 | (a ^ result) >= 0, "checkedSubtract", a, b);
    return result;
  }
@GwtIncompatible // TODO
  public static long checkedSubtract(long a, long b) {
    long result = a - b;
    checkNoOverflow((a ^ b) >= 0 | (a ^ result) >= 0, "checkedSubtract", a, b);
    return result;
  }
Returns the difference of {@code a} and {@code b}, provided it does not overflow.

@throws ArithmeticException if {@code a - b} overflows in signed {@code long} arithmetic