- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for pow (0.05 sec)
-
guava-tests/test/com/google/common/math/LongMathTest.java
for (int i = 0; i < LongMath.halfPowersOf10.length; i++) { assertEquals( BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * i + 1), FLOOR), BigInteger.valueOf(LongMath.halfPowersOf10[i])); } BigInteger nextBigger = BigIntegerMath.sqrt(BigInteger.TEN.pow(2 * LongMath.halfPowersOf10.length + 1), FLOOR); assertTrue(nextBigger.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java
nonnegative[i] = randomNonNegativeBigInteger(Integer.SIZE - 1).intValue(); ints[i] = RANDOM_SOURCE.nextInt(); } } @Benchmark int pow(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += IntMath.pow(positive[j], exponent[j]); } return tmp; } @Benchmark int mod(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.2K bytes - Viewed (0) -
guava/src/com/google/common/math/BigDecimalMath.java
* infinite {@code double} values are considered infinitely far away. For example, 2^2000 is not * representable as a double, but {@code roundToDouble(BigDecimal.valueOf(2).pow(2000), HALF_UP)} * will return {@code Double.MAX_VALUE}, not {@code Double.POSITIVE_INFINITY}. * * <p>For the case of {@link RoundingMode#HALF_EVEN}, this implementation uses the IEEE 754
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 3.1K bytes - Viewed (0) -
android/guava/src/com/google/common/math/BigDecimalMath.java
* infinite {@code double} values are considered infinitely far away. For example, 2^2000 is not * representable as a double, but {@code roundToDouble(BigDecimal.valueOf(2).pow(2000), HALF_UP)} * will return {@code Double.MAX_VALUE}, not {@code Double.POSITIVE_INFINITY}. * * <p>For the case of {@link RoundingMode#HALF_EVEN}, this implementation uses the IEEE 754
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 3.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt
import assertk.assertions.isEqualTo import assertk.assertions.isFalse import assertk.assertions.isTrue import java.io.IOException import java.util.Arrays import java.util.concurrent.atomic.AtomicInteger import kotlin.math.pow import kotlin.test.assertFailsWith import okhttp3.TestUtil.headerEntries import okhttp3.internal.EMPTY_BYTE_ARRAY import okhttp3.internal.http2.Http2.FLAG_COMPRESSED import okhttp3.internal.http2.Http2.FLAG_END_HEADERS
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 28.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathTesting.java
static final ImmutableList<RoundingMode> ALL_SAFE_ROUNDING_MODES = ImmutableList.of(DOWN, UP, FLOOR, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN); // Exponents to test for the pow() function. static final ImmutableList<Integer> EXPONENTS = ImmutableList.of(0, 1, 2, 3, 4, 7, 10, 15, 20, 25, 40, 70); /* Helper function to make a Long value from an Integer. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
static final ImmutableList<RoundingMode> ALL_SAFE_ROUNDING_MODES = ImmutableList.of(DOWN, UP, FLOOR, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN); // Exponents to test for the pow() function. static final ImmutableList<Integer> EXPONENTS = ImmutableList.of(0, 1, 2, 3, 4, 7, 10, 15, 20, 25, 40, 70); /* Helper function to make a Long value from an Integer. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 11.2K bytes - Viewed (0) -
common/scripts/kind_provisioner.sh
python3 - <<EOF from ipaddress import ip_network, IPv6Network; from itertools import islice; net = ip_network('$CIDR') net_bits = 128 if type(net) == IPv6Network else 32; net_len = pow(2, net_bits - net.prefixlen) start, end = int(net_len / 4 * 3), net_len if net_len > 2000: start, end = 1000, 2000 [print(str(ip) + "/" + str(ip.max_prefixlen)) for ip in islice(ip_network('$CIDR').hosts(), start, end)]
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Wed Aug 21 04:47:23 UTC 2024 - 17.2K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
* Returns {@code b} to the {@code k}th power. Even if the result overflows, it will be equal to * {@code BigInteger.valueOf(b).pow(k).longValue()}. This implementation runs in {@code O(log k)} * time. * * @throws IllegalArgumentException if {@code k < 0} */ @GwtIncompatible // TODO public static long pow(long b, int k) { checkNonNegative("exponent", k); if (-2 <= b && b <= 2) { switch ((int) b) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* Returns {@code b} to the {@code k}th power. Even if the result overflows, it will be equal to * {@code BigInteger.valueOf(b).pow(k).longValue()}. This implementation runs in {@code O(log k)} * time. * * @throws IllegalArgumentException if {@code k < 0} */ @GwtIncompatible // TODO public static long pow(long b, int k) { checkNonNegative("exponent", k); if (-2 <= b && b <= 2) { switch ((int) b) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0)