Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for saturatedSubtract (0.24 sec)

  1. guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            Math.max(0, saturatedSubtract(hitCount, other.hitCount)),
            Math.max(0, saturatedSubtract(missCount, other.missCount)),
            Math.max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            Math.max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            Math.max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            Math.max(0, saturatedSubtract(hitCount, other.hitCount)),
            Math.max(0, saturatedSubtract(missCount, other.missCount)),
            Math.max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            Math.max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            Math.max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 12.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                IntMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                LongMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (long a : ALL_LONG_CANDIDATES) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                IntMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (int a : ALL_INTEGER_CANDIDATES) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/math/IntMath.java

       * which case {@code Integer.MAX_VALUE} or {@code Integer.MIN_VALUE} is returned, respectively.
       *
       * @since 20.0
       */
      public static int saturatedSubtract(int a, int b) {
        return Ints.saturatedCast((long) a - b);
      }
    
      /**
       * Returns the product of {@code a} and {@code b} unless it would overflow or underflow in which
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s-",
                saturatedCast(valueOf(a).subtract(valueOf(b))),
                LongMath.saturatedSubtract(a, b));
          }
        }
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // TODO
      public void testSaturatedMultiply() {
        for (long a : ALL_LONG_CANDIDATES) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/math/LongMath.java

       * which case {@code Long.MAX_VALUE} or {@code Long.MIN_VALUE} is returned, respectively.
       *
       * @since 20.0
       */
      @SuppressWarnings("ShortCircuitBoolean")
      public static long saturatedSubtract(long a, long b) {
        long naiveDifference = a - b;
        if ((a ^ b) >= 0 | (a ^ naiveDifference) >= 0) {
          // If a and b have the same signs or a has the same sign as the result then there was no
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 44.6K bytes
    - Viewed (0)
Back to top