- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 122 for setBit (0.03 sec)
-
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);
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Nov 19 01:35:24 UTC 2025 - 27.1K bytes - Viewed (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() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 10.4K bytes - Viewed (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) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 4.2K bytes - Viewed (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() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 11 20:45:32 UTC 2025 - 10.4K bytes - Viewed (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))}. *Registered: Fri Dec 26 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/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
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Jun 04 13:03:16 UTC 2025 - 8.8K bytes - Viewed (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() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (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);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 36.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/CommonServerMessageBlockTest.java
} } @Test @DisplayName("Test setUid method") void testSetUid() { // Given int uid = 1000; doNothing().when(messageBlock).setUid(uid); // When messageBlock.setUid(uid); // Then verify(messageBlock).setUid(uid); } @Test @DisplayName("Test setUid with boundary values") void testSetUidWithBoundaryValues() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/RequestTest.java
@Override public void setMid(long mid) { this.mid = mid; } @Override public int getCommand() { return command; } @Override public void setCommand(int command) { this.command = command; } @Override public void setUid(int uid) { // No-op for testRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.5K bytes - Viewed (0)