- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 53 for BigInteger (0.04 sec)
-
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
import com.google.caliper.Param; import java.math.BigInteger; import java.math.RoundingMode; import org.jspecify.annotations.NullUnmarked; /** * Benchmarks for the rounding methods of {@code BigIntegerMath}. * * @author Louis Wasserman */ @NullUnmarked public class BigIntegerMathRoundingBenchmark { private static final BigInteger[] nonzero1 = new BigInteger[ARRAY_SIZE];
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/DiscreteDomain.java
} @Override public BigInteger previous(BigInteger value) { return value.subtract(BigInteger.ONE); } @Override BigInteger offset(BigInteger origin, long distance) { checkNonnegative(distance, "distance"); return origin.add(BigInteger.valueOf(distance)); } @Override public long distance(BigInteger start, BigInteger end) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 10.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathBenchmarking.java
* range uniformly at random. Zero is treated as having log2 == 0. */ static BigInteger randomNonNegativeBigInteger(int numBits) { int digits = RANDOM_SOURCE.nextInt(numBits); if (digits == 0) { return new BigInteger(1, RANDOM_SOURCE); } else { return new BigInteger(digits, RANDOM_SOURCE).setBit(digits); } } /**
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 4.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ImmutableRangeSetTest.java
implements TestSetGenerator<BigInteger> { @Override public SampleElements<BigInteger> samples() { return new SampleElements<>( BigInteger.valueOf(1), BigInteger.valueOf(4), BigInteger.valueOf(3), BigInteger.valueOf(2), BigInteger.valueOf(5)); } @Override public BigInteger[] createArray(int length) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Jan 25 16:19:30 UTC 2025 - 21.7K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java
} /** * Does a CPU intensive operation on Integer and returns a BigInteger Used to implement an * ordering that spends a lot of cpu. */ static class ExpensiveComputation implements Function<Integer, BigInteger> { @Override public BigInteger apply(Integer from) { BigInteger v = BigInteger.valueOf(from); // Math.sin is very slow for values outside 4*pi
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Dec 22 03:38:46 UTC 2024 - 4.4K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java
} } /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */ private static BigInteger oldSlowFactorial(int n) { if (n <= 20) { return BigInteger.valueOf(LongMath.factorial(n)); } else { int k = 20; return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n)); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
import com.google.caliper.Param; import java.math.BigInteger; import java.math.RoundingMode; import org.jspecify.annotations.NullUnmarked; /** * Benchmarks for the rounding methods of {@code BigIntegerMath}. * * @author Louis Wasserman */ @NullUnmarked public class BigIntegerMathRoundingBenchmark { private static final BigInteger[] nonzero1 = new BigInteger[ARRAY_SIZE];
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/math/MathPreconditions.java
if (x <= 0) { throw new IllegalArgumentException(role + " (" + x + ") must be > 0"); } return x; } @CanIgnoreReturnValue static BigInteger checkPositive(String role, BigInteger x) { if (x.signum() <= 0) { throw new IllegalArgumentException(role + " (" + x + ") must be > 0"); } return x; } @CanIgnoreReturnValue
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 3.2K bytes - Viewed (0) -
guava/src/com/google/common/net/InetAddresses.java
* Returns the {@code Inet4Address} corresponding to a given {@code BigInteger}. * * @param address BigInteger representing the IPv4 address * @return Inet4Address representation of the given BigInteger * @throws IllegalArgumentException if the BigInteger is not between 0 and 2^32-1 * @since 28.2 */ public static Inet4Address fromIPv4BigInteger(BigInteger address) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Feb 19 21:24:11 UTC 2025 - 47.4K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleUtils.java
long significand = doubleToRawLongBits(x) & SIGNIFICAND_MASK; return longBitsToDouble(significand | ONE_BITS); } 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();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 UTC 2024 - 5.1K bytes - Viewed (0)