- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 177 for setBit (0.1 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 02:56:12 UTC 2024 - 10.4K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 18.8K bytes - Viewed (0) -
android/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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:09:25 UTC 2021 - 8.9K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Apr 22 13:09:25 UTC 2021 - 8.9K bytes - Viewed (0) -
android/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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 23.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} @GwtIncompatible // TODO public void testConstantMaxPowerOfSqrt2Unsigned() { assertEquals( /*expected=*/ BigIntegerMath.sqrt(BigInteger.ZERO.setBit(2 * Long.SIZE - 1), FLOOR) .longValue(), /*actual=*/ LongMath.MAX_POWER_OF_SQRT2_UNSIGNED); } @GwtIncompatible // BigIntegerMath // TODO(cpovirk): GWT-enable BigIntegerMath
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K bytes - Viewed (0)