- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for bitLength (0.09 sec)
-
android/guava/src/com/google/common/math/DoubleUtils.java
} static double bigToDouble(BigInteger x) { // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending. BigInteger absX = x.abs(); int exponent = absX.bitLength() - 1; // exponent == floor(log2(abs(x))) if (exponent < Long.SIZE - 1) { return x.longValue(); } else if (exponent > MAX_EXPONENT) { return x.signum() * POSITIVE_INFINITY; } /*
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.1K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
} /** Returns {@code true} if {@code x} represents a power of two. */ public static boolean isPowerOfTwo(BigInteger x) { checkNotNull(x); return x.signum() > 0 && x.getLowestSetBit() == x.bitLength() - 1; } /** * Returns the base-2 logarithm of {@code x}, rounded according to the specified rounding mode. * * @throws IllegalArgumentException if {@code x <= 0}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 18.8K bytes - Viewed (0) -
guava/src/com/google/common/math/DoubleUtils.java
} static double bigToDouble(BigInteger x) { // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending. BigInteger absX = x.abs(); int exponent = absX.bitLength() - 1; // exponent == floor(log2(abs(x))) if (exponent < Long.SIZE - 1) { return x.longValue(); } else if (exponent > MAX_EXPONENT) { return x.signum() * POSITIVE_INFINITY; } /*
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 5.1K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedInteger.java
*/ public static UnsignedInteger valueOf(BigInteger value) { checkNotNull(value); checkArgument( value.signum() >= 0 && value.bitLength() <= Integer.SIZE, "value (%s) is outside the range for an unsigned integer value", value); return fromIntBits(value.intValue()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 8.3K bytes - Viewed (0) -
guava/src/com/google/common/primitives/UnsignedInteger.java
*/ public static UnsignedInteger valueOf(BigInteger value) { checkNotNull(value); checkArgument( value.signum() >= 0 && value.bitLength() <= Integer.SIZE, "value (%s) is outside the range for an unsigned integer value", value); return fromIntBits(value.intValue()); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 8.3K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/UnsignedLong.java
*/ @CanIgnoreReturnValue public static UnsignedLong valueOf(BigInteger value) { checkNotNull(value); checkArgument( value.signum() >= 0 && value.bitLength() <= Long.SIZE, "value (%s) is outside the range for an unsigned long value", value); return fromLongBits(value.longValue()); } /**
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
*/ @CanIgnoreReturnValue public static UnsignedLong valueOf(BigInteger value) { checkNotNull(value); checkArgument( value.signum() >= 0 && value.bitLength() <= Long.SIZE, "value (%s) is outside the range for an unsigned long value", value); return fromLongBits(value.longValue()); } /**
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
// parseInt blows up on overflow as opposed to intValue() which does not. return Integer.parseInt(bigMean.toString()); } private static boolean fitsInInt(BigInteger big) { return big.bitLength() <= 31; } @J2ktIncompatible @GwtIncompatible // NullPointerTester public void testNullPointers() { NullPointerTester tester = new NullPointerTester(); tester.setDefault(int.class, 1);
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
// parseInt blows up on overflow as opposed to intValue() which does not. return Integer.parseInt(bigMean.toString()); } private static boolean fitsInInt(BigInteger big) { return big.bitLength() <= 31; } @J2ktIncompatible @GwtIncompatible // NullPointerTester public void testNullPointers() { NullPointerTester tester = new NullPointerTester(); tester.setDefault(int.class, 1);
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
// parseInt blows up on overflow as opposed to intValue() which does not. return Long.parseLong(bigMean.toString()); } private static boolean fitsInLong(BigInteger big) { return big.bitLength() <= 63; } private static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE); private static final BigInteger MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K bytes - Viewed (0)