Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 66 for floor (0.12 sec)

  1. android/guava/src/com/google/common/math/DoubleUtils.java

      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();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 28 15:37:52 GMT 2021
    - 5.1K bytes
    - Viewed (0)
  2. guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java

      private static final double[] doubleInLongRange = new double[ARRAY_SIZE];
      private static final double[] positiveDoubles = new double[ARRAY_SIZE];
    
      @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"})
      RoundingMode mode;
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          doubleInIntRange[i] = randomDouble(Integer.SIZE - 2);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

          nonzero[i] = randomNonZeroBigInteger(Integer.SIZE - 2).intValue();
          ints[i] = RANDOM_SOURCE.nextInt();
        }
      }
    
      @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"})
      RoundingMode mode;
    
      @Benchmark
      int log2(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/collect/SortedMultisets.java

        @Override
        @CheckForNull
        public E lower(@ParametricNullness E e) {
          return getElementOrNull(multiset().headMultiset(e, OPEN).lastEntry());
        }
    
        @Override
        @CheckForNull
        public E floor(@ParametricNullness E e) {
          return getElementOrNull(multiset().headMultiset(e, CLOSED).lastEntry());
        }
    
        @Override
        @CheckForNull
        public E ceiling(@ParametricNullness E e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/collect/ForwardingNavigableSetTest.java

          return standardSubSet(fromElement, toElement);
        }
    
        @Override
        public @Nullable T lower(T e) {
          return standardLower(e);
        }
    
        @Override
        public @Nullable T floor(T e) {
          return standardFloor(e);
        }
    
        @Override
        public @Nullable T ceiling(T e) {
          return standardCeiling(e);
        }
    
        @Override
        public @Nullable T higher(T e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 6.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/LongMathTest.java

          }
        }
      }
    
      // Relies on the correctness of log10(long, FLOOR) and of pow(long, int).
      @GwtIncompatible // TODO
      public void testLog10Exact() {
        for (long x : POSITIVE_LONG_CANDIDATES) {
          int floor = LongMath.log10(x, FLOOR);
          boolean expectedSuccess = LongMath.pow(10, floor) == x;
          try {
            assertEquals(floor, LongMath.log10(x, UNNECESSARY));
            assertTrue(expectedSuccess);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/FilteredCollectionsTestUtil.java

            NavigableSet<Integer> unfiltered = createUnfiltered(filtered);
            for (int i = 0; i < 10; i++) {
              assertEquals(unfiltered.lower(i), filtered.lower(i));
              assertEquals(unfiltered.floor(i), filtered.floor(i));
              assertEquals(unfiltered.ceiling(i), filtered.ceiling(i));
              assertEquals(unfiltered.higher(i), filtered.higher(i));
            }
          }
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/AbstractMapBasedMultimap.java

        @CheckForNull
        public V lower(@ParametricNullness V v) {
          return getSortedSetDelegate().lower(v);
        }
    
        @Override
        @CheckForNull
        public V floor(@ParametricNullness V v) {
          return getSortedSetDelegate().floor(v);
        }
    
        @Override
        @CheckForNull
        public V ceiling(@ParametricNullness V v) {
          return getSortedSetDelegate().ceiling(v);
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 13 14:11:58 GMT 2023
    - 46.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/ImmutableSortedSetTest.java

        assertThat(set.floor("f")).isNull();
      }
    
      public void testFloor_elementPresent() {
        ImmutableSortedSet<String> set =
            ImmutableSortedSet.copyOf(new String[] {"e", "a", "e", "f", "b", "i", "d", "a", "c", "k"});
        assertThat(set.floor("f")).isEqualTo("f");
        assertThat(set.floor("j")).isEqualTo("i");
        assertThat(set.floor("q")).isEqualTo("k");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46.1K bytes
    - Viewed (0)
  10. android/guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java

      private static final double[] doubleInLongRange = new double[ARRAY_SIZE];
      private static final double[] positiveDoubles = new double[ARRAY_SIZE];
    
      @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"})
      RoundingMode mode;
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          doubleInIntRange[i] = randomDouble(Integer.SIZE - 2);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.6K bytes
    - Viewed (0)
Back to top