Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for odd (0.26 sec)

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

        int bTwos = Integer.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
        while (a != b) { // both a, b are odd
          // The key to the binary GCD algorithm is as follows:
          // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
          // We bend over backwards to avoid branching, adapting a technique from
    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. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          int halfEven = BigIntegerMath.log2(x, HALF_EVEN);
          // Now figure out what rounding mode we should behave like (it depends if FLOOR was
          // odd/even).
          boolean floorWasEven = (BigIntegerMath.log2(x, FLOOR) & 1) == 0;
          assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven);
        }
      }
    
      @GwtIncompatible // TODO
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          int halfEven = BigIntegerMath.log2(x, HALF_EVEN);
          // Now figure out what rounding mode we should behave like (it depends if FLOOR was
          // odd/even).
          boolean floorWasEven = (BigIntegerMath.log2(x, FLOOR) & 1) == 0;
          assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven);
        }
      }
    
      @GwtIncompatible // TODO
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 28.2K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/math/LongMath.java

        int bTwos = Long.numberOfTrailingZeros(b);
        b >>= bTwos; // divide out all 2s
        while (a != b) { // both a, b are odd
          // The key to the binary GCD algorithm is as follows:
          // Both a and b are odd. Assume a > b; then gcd(a - b, b) = gcd(a, b).
          // But in gcd(a - b, b), a - b is even and b is odd, so we can divide out powers of two.
    
          // We bend over backwards to avoid branching, adapting a technique from
    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. cmd/storage-errors.go

    	}
    	if isSysErrHandleInvalid(err) {
    		return errFileNotFound
    	}
    	if isSysErrIO(err) {
    		return errFaultyDisk
    	}
    	if isSysErrInvalidArg(err) {
    		storageLogIf(context.Background(), err)
    		// For some odd calls with O_DIRECT reads
    		// filesystems can return EINVAL, handle
    		// these as FileNotFound instead.
    		return errFileNotFound
    	}
    	if isSysErrNoSpace(err) {
    		return errDiskFull
    	}
    	return err
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

      }
    
      private static final int EVEN_POWERS_OF_TWO = 0x55555555;
      private static final int ODD_POWERS_OF_TWO = 0xaaaaaaaa;
    
      @VisibleForTesting
      static boolean isEvenLevel(int index) {
        int oneBased = ~~(index + 1); // for GWT
        checkState(oneBased > 0, "negative index");
        return (oneBased & EVEN_POWERS_OF_TWO) > (oneBased & ODD_POWERS_OF_TWO);
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 34K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

       * a part of the response to `streamId`. The `promisedStreamId` has a priority of one greater than
       * `streamId`.
       *
       * @param streamId client-initiated stream ID.  Must be an odd number.
       * @param promisedStreamId server-initiated stream ID.  Must be an even number.
       * @param requestHeaders minimally includes `:method`, `:scheme`, `:authority`, and `:path`.
       */
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/CompactHashSet.java

      }
    
      /** Resizes the entries storage if necessary. */
      private void resizeMeMaybe(int newSize) {
        int entriesSize = requireEntries().length;
        if (newSize > entriesSize) {
          // 1.5x but round up to nearest odd (this is optimal for memory consumption on Android)
          int newCapacity =
              Math.min(CompactHashing.MAX_SIZE, (entriesSize + Math.max(1, entriesSize >>> 1)) | 1);
          if (newCapacity != entriesSize) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 24K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/CompactHashSet.java

      }
    
      /** Resizes the entries storage if necessary. */
      private void resizeMeMaybe(int newSize) {
        int entriesSize = requireEntries().length;
        if (newSize > entriesSize) {
          // 1.5x but round up to nearest odd (this is optimal for memory consumption on Android)
          int newCapacity =
              Math.min(CompactHashing.MAX_SIZE, (entriesSize + Math.max(1, entriesSize >>> 1)) | 1);
          if (newCapacity != entriesSize) {
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Feb 05 21:38:59 GMT 2024
    - 24.9K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/math/LongMathTest.java

        assertTrue(sqrtMaxLong <= LongMath.FLOOR_SQRT_MAX_LONG);
      }
    
      @AndroidIncompatible // slow
      @GwtIncompatible // java.math.BigInteger
      public void testMean() {
        // Odd-sized ranges have an obvious mean
        assertMean(2, 1, 3);
    
        assertMean(-2, -3, -1);
        assertMean(0, -1, 1);
        assertMean(1, -1, 3);
        assertMean((1L << 62) - 1, -1, Long.MAX_VALUE);
    
    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)
Back to top