Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for Pow (0.01 sec)

  1. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  3. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  4. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  6. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
  7. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  8. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  9. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
  10. 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: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.4K bytes
    - Viewed (0)
Back to top