Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for isPowerOfTwo (0.15 sec)

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

       * Long.bitCount(Long.MIN_VALUE) == 1}, but {@link Long#MIN_VALUE} is not a power of two.
       */
      @SuppressWarnings("ShortCircuitBoolean")
      public static boolean isPowerOfTwo(long x) {
        return x > 0 & (x & (x - 1)) == 0;
      }
    
      /**
       * Returns 1 if {@code x < y} as unsigned longs, and 0 otherwise. Assumes that x - y fits into a
    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)
Back to top