Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for saturatedMultiply (0.06 sec)

  1. 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) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Aug 29 16:20:07 UTC 2025
    - 46.8K bytes
    - Viewed (0)
  2. 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(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 24.1K bytes
    - Viewed (0)
  3. 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(
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 31.4K bytes
    - Viewed (0)
  4. 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) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
Back to top