Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 166 for setBit (0.18 sec)

  1. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertTrue(ZERO.setBit(result).compareTo(x) <= 0);
            assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0);
          }
        }
      }
    
      public void testLog2Ceiling() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          for (RoundingMode mode : asList(CEILING, UP)) {
            int result = BigIntegerMath.log2(x, mode);
            assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
    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)
  2. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            assertTrue(ZERO.setBit(result).compareTo(x) <= 0);
            assertTrue(ZERO.setBit(result + 1).compareTo(x) > 0);
          }
        }
      }
    
      public void testLog2Ceiling() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          for (RoundingMode mode : asList(CEILING, UP)) {
            int result = BigIntegerMath.log2(x, mode);
            assertTrue(ZERO.setBit(result).compareTo(x) >= 0);
    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)
  3. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

        for (long value : TEST_LONGS) {
          BigInteger expected =
              (value >= 0)
                  ? BigInteger.valueOf(value)
                  : BigInteger.valueOf(value).add(BigInteger.ZERO.setBit(64));
          assertWithMessage(UnsignedLongs.toString(value))
              .that(UnsignedLong.fromLongBits(value).bigIntegerValue())
              .isEqualTo(expected);
        }
      }
    
      public void testValueOfLong() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

        for (long value : TEST_LONGS) {
          BigInteger expected =
              (value >= 0)
                  ? BigInteger.valueOf(value)
                  : BigInteger.valueOf(value).add(BigInteger.ZERO.setBit(64));
          assertWithMessage(UnsignedLongs.toString(value))
              .that(UnsignedLong.fromLongBits(value).bigIntegerValue())
              .isEqualTo(expected);
        }
      }
    
      public void testValueOfLong() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 06 16:10:08 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/math/BigIntegerMath.java

       *
       * @throws IllegalArgumentException if {@code x <= 0}
       * @since 20.0
       */
      public static BigInteger ceilingPowerOfTwo(BigInteger x) {
        return BigInteger.ZERO.setBit(log2(x, CEILING));
      }
    
      /**
       * Returns the largest power of two less than or equal to {@code x}. This is equivalent to {@code
       * BigInteger.valueOf(2).pow(log2(x, FLOOR))}.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        assertThat(UnsignedLongs.parseUnsignedLong("1234567890abcdef", 16))
            .isEqualTo(0x1234567890abcdefL);
      }
    
      public void testParseLongWithRadixLimits() {
        BigInteger max = BigInteger.ZERO.setBit(64).subtract(ONE);
        // loops through all legal radix values.
        for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) {
          // tests can successfully parse a number string with this radix.
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

        assertThat(UnsignedLongs.parseUnsignedLong("1234567890abcdef", 16))
            .isEqualTo(0x1234567890abcdefL);
      }
    
      public void testParseLongWithRadixLimits() {
        BigInteger max = BigInteger.ZERO.setBit(64).subtract(ONE);
        // loops through all legal radix values.
        for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX; radix++) {
          // tests can successfully parse a number string with this radix.
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/math/IntMathTest.java

      }
    
      @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath
      public void testConstantMaxPowerOfSqrt2Unsigned() {
        assertEquals(
            /*expected=*/ BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Integer.SIZE - 1), FLOOR)
                .intValue(),
            /*actual=*/ IntMath.MAX_POWER_OF_SQRT2_UNSIGNED);
      }
    
      @GwtIncompatible // pow()
      public void testConstantsPowersOf10() {
    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)
  9. android/guava-tests/test/com/google/common/math/LongMathTest.java

        }
      }
    
      @GwtIncompatible // TODO
      public void testConstantMaxPowerOfSqrt2Unsigned() {
        assertEquals(
            /*expected=*/ BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Long.SIZE - 1), FLOOR)
                .longValue(),
            /*actual=*/ LongMath.MAX_POWER_OF_SQRT2_UNSIGNED);
      }
    
      @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath
    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)
  10. guava-tests/test/com/google/common/math/IntMathTest.java

      }
    
      @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath
      public void testConstantMaxPowerOfSqrt2Unsigned() {
        assertEquals(
            /*expected=*/ BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Integer.SIZE - 1), FLOOR)
                .intValue(),
            /*actual=*/ IntMath.MAX_POWER_OF_SQRT2_UNSIGNED);
      }
    
      @GwtIncompatible // pow()
      public void testConstantsPowersOf10() {
    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)
Back to top