- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for floorPowerOfTwo (0.05 sec)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} } public void testCeilingPowerOfTwoZero() { assertThrows( IllegalArgumentException.class, () -> BigIntegerMath.ceilingPowerOfTwo(BigInteger.ZERO)); } public void testFloorPowerOfTwoZero() { assertThrows( IllegalArgumentException.class, () -> BigIntegerMath.floorPowerOfTwo(BigInteger.ZERO)); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} } } public void testFloorPowerOfTwo() { for (int x : POSITIVE_INTEGER_CANDIDATES) { BigInteger expectedResult = BigIntegerMath.floorPowerOfTwo(BigInteger.valueOf(x)); assertEquals(expectedResult.intValue(), IntMath.floorPowerOfTwo(x)); } } public void testCeilingPowerOfTwoNegative() { for (int x : NEGATIVE_INTEGER_CANDIDATES) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} } } public void testFloorPowerOfTwo() { for (long x : POSITIVE_LONG_CANDIDATES) { BigInteger expectedResult = BigIntegerMath.floorPowerOfTwo(BigInteger.valueOf(x)); assertEquals(expectedResult.longValue(), LongMath.floorPowerOfTwo(x)); } } public void testCeilingPowerOfTwoNegative() { for (long x : NEGATIVE_LONG_CANDIDATES) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 31.4K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* BigInteger.valueOf(2).pow(log2(x, FLOOR))}. * * @throws IllegalArgumentException if {@code x <= 0} * @since 20.0 */ public static BigInteger floorPowerOfTwo(BigInteger x) { return BigInteger.ZERO.setBit(log2(x, FLOOR)); } /** Returns {@code true} if {@code x} represents a power of two. */ public static boolean isPowerOfTwo(BigInteger x) { checkNotNull(x);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* checkedPow(2, log2(x, FLOOR))}. * * @throws IllegalArgumentException if {@code x <= 0} * @since 20.0 */ public static long floorPowerOfTwo(long x) { checkPositive("x", x); // Long.highestOneBit was buggy on GWT. We've fixed it, but I'm not certain when the fix will // be released.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0)