- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for testIsPowerOfTwo (0.06 seconds)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
assertEquals( BigIntegerMath.sqrt( BigInteger.ZERO.setBit(2 * BigIntegerMath.SQRT2_PRECOMPUTE_THRESHOLD + 1), FLOOR), BigIntegerMath.SQRT2_PRECOMPUTED_BITS); } public void testIsPowerOfTwo() { for (BigInteger x : ALL_BIGINTEGER_CANDIDATES) { // Checks for a single bit set. boolean expected = x.signum() > 0 & x.and(x.subtract(ONE)).equals(ZERO);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Nov 19 01:35:24 GMT 2025 - 27.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
assertTrue(DoubleMath.isPowerOfTwo(StrictMath.pow(2.0, i))); } } @GwtIncompatible // DoubleMath.isPowerOfTwo, DoubleMath.log2(double, RoundingMode), StrictMath public void testIsPowerOfTwo() { for (double x : ALL_DOUBLE_CANDIDATES) { boolean expected = x > 0 && !Double.isInfinite(x) && !Double.isNaN(x)
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 27.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
assertTrue(DoubleMath.isPowerOfTwo(StrictMath.pow(2.0, i))); } } @GwtIncompatible // DoubleMath.isPowerOfTwo, DoubleMath.log2(double, RoundingMode), StrictMath public void testIsPowerOfTwo() { for (double x : ALL_DOUBLE_CANDIDATES) { boolean expected = x > 0 && !Double.isInfinite(x) && !Double.isNaN(x)
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Oct 30 14:15:36 GMT 2025 - 27.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
int actual = IntMath.lessThanBranchFree(x, y); assertEquals(expected, actual); } } } } @GwtIncompatible // java.math.BigInteger public void testIsPowerOfTwo() { for (int x : ALL_INTEGER_CANDIDATES) { // Checks for a single bit set. BigInteger bigX = BigInteger.valueOf(x); boolean expected = (bigX.signum() > 0) && (bigX.bitCount() == 1);
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Mon Aug 11 19:31:30 GMT 2025 - 24.1K bytes - Click Count (0)