- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for pow (0.03 sec)
-
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
.roundUnnecessaryShouldThrow() .test(); } public void testRoundToDouble_negativeTwoToThe54MinusOne() { new RoundToDoubleTester(BigDecimal.valueOf((-1L << 54) - 1)) .setExpectation(-Math.pow(2, 54), DOWN, CEILING, HALF_DOWN, HALF_UP, HALF_EVEN) .setExpectation(DoubleUtils.nextDown(-Math.pow(2, 54)), FLOOR, UP)
Registered: 2024-11-01 12:43 - Last Modified: 2023-09-06 17:04 - 10.6K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
binomialArguments[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k; } } @Benchmark int pow(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.pow(positive[j], exponents[j]); } return tmp; } @Benchmark int mod(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) {
Registered: 2024-11-01 12:43 - Last Modified: 2017-12-04 17:37 - 3.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
if (d >= 1.0) { assertTrue(log2 >= 0); assertTrue(StrictMath.pow(2.0, log2) <= d); assertTrue(StrictMath.pow(2.0, log2 + 1) > d); } else { assertTrue(log2 <= 0); assertTrue(StrictMath.pow(2.0, log2) >= d); assertTrue(StrictMath.pow(2.0, log2 - 1) < d); } } }
Registered: 2024-11-01 12:43 - Last Modified: 2024-10-18 15:00 - 27.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} } } @GwtIncompatible // 2147483646^2 expected=4 public void testPow() { for (int i : ALL_INTEGER_CANDIDATES) { for (int pow : EXPONENTS) { assertEquals(i + "^" + pow, BigInteger.valueOf(i).pow(pow).intValue(), IntMath.pow(i, pow)); } } } @AndroidIncompatible // slow public void testDivNonZero() { for (int p : NONZERO_INTEGER_CANDIDATES) {
Registered: 2024-11-01 12:43 - Last Modified: 2024-10-19 00:26 - 23.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
if (d >= 1.0) { assertTrue(log2 >= 0); assertTrue(StrictMath.pow(2.0, log2) <= d); assertTrue(StrictMath.pow(2.0, log2 + 1) > d); } else { assertTrue(log2 <= 0); assertTrue(StrictMath.pow(2.0, log2) >= d); assertTrue(StrictMath.pow(2.0, log2 - 1) < d); } } }
Registered: 2024-11-01 12:43 - Last Modified: 2024-10-18 15:00 - 27.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
} } } @GwtIncompatible // 2147483646^2 expected=4 public void testPow() { for (int i : ALL_INTEGER_CANDIDATES) { for (int pow : EXPONENTS) { assertEquals(i + "^" + pow, BigInteger.valueOf(i).pow(pow).intValue(), IntMath.pow(i, pow)); } } } @AndroidIncompatible // slow public void testDivNonZero() { for (int p : NONZERO_INTEGER_CANDIDATES) {
Registered: 2024-11-01 12:43 - Last Modified: 2024-10-19 00:26 - 23.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
@BeforeExperiment void setUp() { // random integers will be generated in this range, then raised to the // power of (1/concentration) and floor()ed max = Ints.checkedCast((long) Math.pow(distinctKeys, concentration)); cache = CacheBuilder.newBuilder() .concurrencyLevel(segments) .maximumSize(maximumSize) .build(
Registered: 2024-11-01 12:43 - Last Modified: 2017-12-04 17:37 - 3.4K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
case HALF_DOWN: case HALF_UP: case HALF_EVEN: // Since sqrt(10) is irrational, log10(x) - floorLog can never be exactly 0.5 BigInteger x2 = x.pow(2); BigInteger halfPowerSquared = floorPow.pow(2).multiply(BigInteger.TEN); return (x2.compareTo(halfPowerSquared) <= 0) ? floorLog : floorLog + 1; } throw new AssertionError(); }
Registered: 2024-11-01 12:43 - Last Modified: 2024-10-16 17:21 - 18.8K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java
@BeforeExperiment void setUp() { // random integers will be generated in this range, then raised to the // power of (1/concentration) and floor()ed max = Ints.checkedCast((long) Math.pow(distinctKeys, concentration)); cache = CacheBuilder.newBuilder() .concurrencyLevel(segments) .maximumSize(maximumSize) .build(
Registered: 2024-11-01 12:43 - Last Modified: 2017-12-04 17:37 - 3.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java
binomialArguments[i][0] = RANDOM_SOURCE.nextInt(MathBenchmarking.biggestBinomials[k] - k) + k; } } @Benchmark int pow(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += LongMath.pow(positive[j], exponents[j]); } return tmp; } @Benchmark int mod(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) {
Registered: 2024-11-01 12:43 - Last Modified: 2017-12-04 17:37 - 3.5K bytes - Viewed (0)