Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for saturatedSubtract (0.95 sec)

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

        return new CacheStats(
            max(0, saturatedSubtract(hitCount, other.hitCount)),
            max(0, saturatedSubtract(missCount, other.missCount)),
            max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
            max(0, saturatedSubtract(evictionCount, other.evictionCount)));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/CacheStats.java

        return new CacheStats(
            max(0, saturatedSubtract(hitCount, other.hitCount)),
            max(0, saturatedSubtract(missCount, other.missCount)),
            max(0, saturatedSubtract(loadSuccessCount, other.loadSuccessCount)),
            max(0, saturatedSubtract(loadExceptionCount, other.loadExceptionCount)),
            max(0, saturatedSubtract(totalLoadTime, other.totalLoadTime)),
            max(0, saturatedSubtract(evictionCount, other.evictionCount)));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:07:49 UTC 2024
    - 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/math/LongMath.java

       *
       * @since 20.0
       */
      // Whenever both tests are cheap and functional, it's faster to use &, | instead of &&, ||
      @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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
Back to top