Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 15 for isPowerOfTwo (0.06 seconds)

  1. src/test/java/jcifs/FileNotifyInformationTest.java

                assertTrue(isPowerOfTwo(FileNotifyInformation.FILE_NOTIFY_CHANGE_FILE_NAME));
                assertTrue(isPowerOfTwo(FileNotifyInformation.FILE_NOTIFY_CHANGE_DIR_NAME));
                assertTrue(isPowerOfTwo(FileNotifyInformation.FILE_NOTIFY_CHANGE_ATTRIBUTES));
                assertTrue(isPowerOfTwo(FileNotifyInformation.FILE_NOTIFY_CHANGE_SIZE));
                assertTrue(isPowerOfTwo(FileNotifyInformation.FILE_NOTIFY_CHANGE_LAST_WRITE));
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 18.1K bytes
    - Click Count (0)
  2. src/test/java/jcifs/internal/dtyp/SecurityInfoTest.java

            assertTrue(isPowerOfTwo(SecurityInfo.OWNER_SECURITY_INFO));
            assertTrue(isPowerOfTwo(SecurityInfo.GROUP_SECURITY_INFO));
            assertTrue(isPowerOfTwo(SecurityInfo.DACL_SECURITY_INFO));
            assertTrue(isPowerOfTwo(SecurityInfo.SACL_SECURITY_INFO));
            assertTrue(isPowerOfTwo(SecurityInfo.LABEL_SECURITY_INFO));
            assertTrue(isPowerOfTwo(SecurityInfo.ATTRIBUTE_SECURITY_INFO));
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 07:14:38 GMT 2025
    - 7.5K bytes
    - Click Count (0)
  3. guava-tests/benchmark/com/google/common/math/DoubleMathBenchmark.java

          if (DoubleMath.isMathematicalInteger(doubles[j])) {
            tmp++;
          }
        }
        return tmp;
      }
    
      @Benchmark
      int isPowerOfTwo(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          if (DoubleMath.isPowerOfTwo(doubles[j])) {
            tmp++;
          }
        }
        return tmp;
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.6K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

        for (double x : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          boolean isPowerOfTwo = StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          try {
            int log2 = DoubleMath.log2(x, UNNECESSARY);
            assertThat(Math.scalb(1.0, log2)).isEqualTo(x);
            assertTrue(isPowerOfTwo);
          } catch (ArithmeticException e) {
            assertFalse(isPowerOfTwo);
          }
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Feb 03 16:20:39 GMT 2026
    - 27.5K bytes
    - Click Count (0)
  5. android/guava-tests/benchmark/com/google/common/math/DoubleMathBenchmark.java

          if (DoubleMath.isMathematicalInteger(doubles[j])) {
            tmp++;
          }
        }
        return tmp;
      }
    
      @Benchmark
      int isPowerOfTwo(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          if (DoubleMath.isPowerOfTwo(doubles[j])) {
            tmp++;
          }
        }
        return tmp;
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Dec 19 18:03:30 GMT 2024
    - 2.6K bytes
    - Click Count (0)
  6. android/guava/src/com/google/common/math/DoubleMath.java

            checkRoundingUnnecessary(isPowerOfTwo(x));
          // fall through
          case FLOOR:
            increment = false;
            break;
          case CEILING:
            increment = !isPowerOfTwo(x);
            break;
          case DOWN:
            increment = exponent < 0 & !isPowerOfTwo(x);
            break;
          case UP:
            increment = exponent >= 0 & !isPowerOfTwo(x);
            break;
          case HALF_DOWN:
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 19.3K bytes
    - Click Count (0)
  7. guava-tests/test/com/google/common/math/DoubleMathTest.java

        for (double x : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          boolean isPowerOfTwo = StrictMath.pow(2.0, DoubleMath.log2(x, FLOOR)) == x;
          try {
            int log2 = DoubleMath.log2(x, UNNECESSARY);
            assertThat(Math.scalb(1.0, log2)).isEqualTo(x);
            assertTrue(isPowerOfTwo);
          } catch (ArithmeticException e) {
            assertFalse(isPowerOfTwo);
          }
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Feb 03 16:20:39 GMT 2026
    - 27.5K bytes
    - Click Count (0)
  8. src/test/java/jcifs/internal/smb2/Smb2ConstantsTest.java

                // Verify each is a power of 2
                for (int cap : capabilities) {
                    assertTrue(isPowerOfTwo(cap), "Capability 0x" + Integer.toHexString(cap) + " should be a power of 2");
                }
    
                // Verify no overlapping bits
                for (int i = 0; i < capabilities.length; i++) {
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Thu Aug 14 05:31:44 GMT 2025
    - 14.1K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/math/BigIntegerMath.java

        int logFloor = x.bitLength() - 1;
        switch (mode) {
          case UNNECESSARY:
            checkRoundingUnnecessary(isPowerOfTwo(x)); // fall through
          case DOWN:
          case FLOOR:
            return logFloor;
    
          case UP:
          case CEILING:
            return isPowerOfTwo(x) ? logFloor : logFloor + 1;
    
          case HALF_DOWN:
          case HALF_UP:
          case HALF_EVEN:
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Aug 07 16:05:33 GMT 2025
    - 18.8K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/math/BigIntegerMathTest.java

          assertTrue(BigIntegerMath.isPowerOfTwo(result));
          assertThat(result).isAtLeast(x);
          assertThat(result).isLessThan(x.add(x));
        }
      }
    
      public void testFloorPowerOfTwo() {
        for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) {
          BigInteger result = BigIntegerMath.floorPowerOfTwo(x);
          assertTrue(BigIntegerMath.isPowerOfTwo(result));
          assertThat(result).isAtMost(x);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 03 04:51:56 GMT 2026
    - 27.1K bytes
    - Click Count (0)
Back to Top