Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 1,008 for log2 (0.03 sec)

  1. guava/src/com/google/common/math/LongMath.java

         *
         * The key idea is that based on the number of leading zeros (equivalently, floor(log2(x))), we
         * can narrow the possible floor(log10(x)) values to two. For example, if floor(log2(x)) is 6,
         * then 64 <= x < 128, so floor(log10(x)) is either 1 or 2.
         */
        int y = maxLog10ForLeadingZeros[Long.numberOfLeadingZeros(x)];
        /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

      @SuppressWarnings("UseCorrectAssertInTests") // TODO(b/345814817): Remove or convert assertion.
      private static BigInteger oldSlowFactorial(int n1, int n2) {
        assert n1 <= n2;
        if (IntMath.log2(n2, CEILING) * (n2 - n1) < Long.SIZE - 1) {
          // the result will definitely fit into a long
          long result = 1;
          for (int i = n1 + 1; i <= n2; i++) {
            result *= i;
          }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  3. guava/src/com/google/common/math/DoubleUtils.java

        // 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)
  4. android/guava/src/com/google/common/collect/TopKSelector.java

     * offering expected O(n + k log k) performance (worst case O(n log k)) for n calls to {@link
     * #offer} and a call to {@link #topK}, with O(k) memory. In comparison, quickselect has the same
     * asymptotics but requires O(n) memory, and a {@code PriorityQueue} implementation takes O(n log
     * k). In benchmarks, this implementation performs at least as well as either implementation, and
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. guava/src/com/google/common/io/BaseEncoding.java

    import static com.google.common.base.Preconditions.checkPositionIndexes;
    import static com.google.common.base.Preconditions.checkState;
    import static com.google.common.math.IntMath.divide;
    import static com.google.common.math.IntMath.log2;
    import static java.lang.Math.max;
    import static java.lang.Math.min;
    import static java.math.RoundingMode.CEILING;
    import static java.math.RoundingMode.FLOOR;
    import static java.math.RoundingMode.UNNECESSARY;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/Striped.java

          return size;
        }
      }
    
      /** A bit mask were all bits are set. */
      private static final int ALL_SET = ~0;
    
      private static int ceilToPowerOfTwo(int x) {
        return 1 << IntMath.log2(x, RoundingMode.CEILING);
      }
    
      /*
       * This method was written by Doug Lea with assistance from members of JCP JSR-166 Expert Group
       * and released to the public domain, as explained at
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 26 12:58:35 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  7. .github/logo.svg

    logo.svg...
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Oct 23 05:59:13 UTC 2019
    - 978 bytes
    - Viewed (0)
  8. docs/en/docs/img/logo-margin/logo-teal.png

    logo-teal.png...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Feb 04 20:56:59 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  9. docs/en/docs/img/logo-teal.svg

    logo-teal.svg...
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Feb 04 20:56:59 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. src/main/webapp/images/logo.png

    logo.png...
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 30 11:04:53 UTC 2015
    - 2.3K bytes
    - Viewed (0)
Back to top