- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 89 for setBit (0.03 seconds)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
assertThat(ZERO.setBit(result)).isAtMost(x); assertThat(ZERO.setBit(result + 1)).isGreaterThan(x); } } } public void testLog2Ceiling() { for (BigInteger x : POSITIVE_BIGINTEGER_CANDIDATES) { for (RoundingMode mode : asList(CEILING, UP)) { int result = BigIntegerMath.log2(x, mode); assertThat(ZERO.setBit(result)).isAtLeast(x);
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/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() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 10.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
int digits = RANDOM_SOURCE.nextInt(numBits); if (digits == 0) { return new BigInteger(1, RANDOM_SOURCE); } else { return new BigInteger(digits, RANDOM_SOURCE).setBit(digits); } } /** * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping the sign with 50% * probability. */ static BigInteger randomNonZeroBigInteger(int numBits) {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Aug 10 19:54:19 GMT 2025 - 4.2K bytes - Click Count (0) -
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() {
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Dec 11 20:45:32 GMT 2025 - 10.4K bytes - Click Count (0) -
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))}. *Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 18.8K bytes - Click Count (0) -
guava/src/com/google/common/primitives/UnsignedLong.java
public BigInteger bigIntegerValue() { BigInteger bigInt = BigInteger.valueOf(value & UNSIGNED_MASK); if (value < 0) { bigInt = bigInt.setBit(Long.SIZE - 1); } return bigInt; } @Override public int compareTo(UnsignedLong o) { checkNotNull(o); return UnsignedLongs.compare(value, o.value); } @Override
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Wed Jun 04 13:03:16 GMT 2025 - 8.8K bytes - Click Count (0) -
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() {
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) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2RequestTest.java
testRequest.setRequestCredits(credits); assertEquals(credits, testRequest.getCredit()); } @Test @DisplayName("setTid should set tree ID") void testSetTid() { int tid = 12345; testRequest.setTid(tid); assertEquals(tid, testRequest.getTreeId()); } } @Nested @DisplayName("Async Operation Tests")
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.7K bytes - Click Count (0) -
src/main/java/jcifs/internal/smb2/Smb2CancelRequest.java
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 4.5K bytes - Click Count (0) -
src/test/java/jcifs/internal/smb1/ServerMessageBlockTest.java
testBlock.setFlags2(0x3456); testBlock.setSignSeq(42); testBlock.setTid(0x1234); testBlock.setPid(0x5678); testBlock.setUid(0x9ABC); testBlock.setMid(0xDEF0); testBlock.received(); String result = testBlock.toString(); assertNotNull(result);
Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 36.2K bytes - Click Count (0)