Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for roundToLong (0.09 sec)

  1. android/guava-tests/test/com/google/common/math/DoubleMathTest.java

        }
      }
    
      @GwtIncompatible // DoubleMath.roundToLong(double, RoundingMode)
      public void testRoundNaNToLongAlwaysFails() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertThrows(ArithmeticException.class, () -> DoubleMath.roundToLong(Double.NaN, mode));
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToLong(double, RoundingMode)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/math/DoubleMathTest.java

        }
      }
    
      @GwtIncompatible // DoubleMath.roundToLong(double, RoundingMode)
      public void testRoundNaNToLongAlwaysFails() {
        for (RoundingMode mode : ALL_ROUNDING_MODES) {
          assertThrows(ArithmeticException.class, () -> DoubleMath.roundToLong(Double.NaN, mode));
        }
      }
    
      @GwtIncompatible // DoubleMath.roundToLong(double, RoundingMode)
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  3. guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToInt(doubleInIntRange[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      long roundToLong(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToLong(doubleInLongRange[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int roundToBigInteger(int reps) {
        int tmp = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java

          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToInt(doubleInIntRange[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      long roundToLong(int reps) {
        long tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += DoubleMath.roundToLong(doubleInLongRange[j], mode);
        }
        return tmp;
      }
    
      @Benchmark
      int roundToBigInteger(int reps) {
        int tmp = 0;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/hash/BloomFilter.java

         * is close to 1 (why?), gives the following formula.
         */
        double fractionOfBitsSet = (double) bitCount / bitSize;
        return DoubleMath.roundToLong(
            -Math.log1p(-fractionOfBitsSet) * bitSize / numHashFunctions, RoundingMode.HALF_UP);
      }
    
      /** Returns the number of bits in the underlying bit array. */
      @VisibleForTesting
      long bitSize() {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 23 16:45:30 UTC 2024
    - 26.6K bytes
    - Viewed (0)
Back to top