Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for saturatedMultiply (0.38 sec)

  1. android/guava/src/com/google/common/math/IntMath.java

        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return saturatedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = saturatedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                if (-FLOOR_SQRT_MAX_INT > b | b > FLOOR_SQRT_MAX_INT) {
    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)
  2. android/guava/src/com/google/common/collect/Collections2.java

              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 22.8K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Collections2.java

              // We move to the next non-repeated element.
              permutations = IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
              r = 0;
              if (permutations == Integer.MAX_VALUE) {
                return Integer.MAX_VALUE;
              }
            }
            n++;
            r++;
          }
          return IntMath.saturatedMultiply(permutations, IntMath.binomial(n, r));
        }
    
        @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 23.1K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/LongMath.java

        while (true) {
          switch (k) {
            case 0:
              return accum;
            case 1:
              return saturatedMultiply(accum, b);
            default:
              if ((k & 1) != 0) {
                accum = saturatedMultiply(accum, b);
              }
              k >>= 1;
              if (k > 0) {
                if (-FLOOR_SQRT_MAX_LONG > b | b > FLOOR_SQRT_MAX_LONG) {
    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)
  5. guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                IntMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    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)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                LongMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (long a : ALL_LONG_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    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)
  7. android/guava-tests/test/com/google/common/math/IntMathTest.java

          for (int b : ALL_INTEGER_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                IntMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (int a : ALL_INTEGER_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/io/ByteStreams.java

        // reading and so all of the bytes in each new allocated buffer are available for reading from
        // the stream.
        for (int bufSize = initialBufferSize;
            totalLen < MAX_ARRAY_LEN;
            bufSize = IntMath.saturatedMultiply(bufSize, bufSize < 4096 ? 4 : 2)) {
          byte[] buf = new byte[min(bufSize, MAX_ARRAY_LEN - totalLen)];
          bufs.add(buf);
          int off = 0;
          while (off < buf.length) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 17 18:59:58 GMT 2024
    - 29.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/math/LongMathTest.java

          for (long b : ALL_LONG_CANDIDATES) {
            assertOperationEquals(
                a,
                b,
                "s*",
                saturatedCast(valueOf(a).multiply(valueOf(b))),
                LongMath.saturatedMultiply(a, b));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testSaturatedPow() {
        for (long a : ALL_LONG_CANDIDATES) {
          for (int b : EXPONENTS) {
            assertOperationEquals(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
Back to top