Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 372 for positive (0.23 sec)

  1. android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java

      private static final long[] positive = new long[ARRAY_SIZE];
      private static final long[] nonnegative = new long[ARRAY_SIZE];
      private static final long[] longs = new long[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          exponents[i] = randomExponent();
          positive[i] = randomPositiveBigInteger(Long.SIZE - 1).longValue();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.5K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

          positive[i] = randomPositiveBigInteger(Integer.SIZE - 1).intValue();
          nonnegative[i] = randomNonNegativeBigInteger(Integer.SIZE - 1).intValue();
          ints[i] = RANDOM_SOURCE.nextInt();
        }
      }
    
      @Benchmark
      int pow(int reps) {
        int tmp = 0;
        for (int i = 0; i < reps; i++) {
          int j = i & ARRAY_MASK;
          tmp += IntMath.pow(positive[j], exponent[j]);
        }
        return tmp;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  3. android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

     * @author Louis Wasserman
     */
    public class IntMathRoundingBenchmark {
      private static final int[] positive = new int[ARRAY_SIZE];
      private static final int[] nonzero = new int[ARRAY_SIZE];
      private static final int[] ints = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          positive[i] = randomPositiveBigInteger(Integer.SIZE - 2).intValue();
    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/math/DoubleMath.java

       *
       * <p>Special cases:
       *
       * <ul>
       *   <li>If {@code x} is NaN or less than zero, the result is NaN.
       *   <li>If {@code x} is positive infinity, the result is positive infinity.
       *   <li>If {@code x} is positive or negative zero, the result is negative infinity.
       * </ul>
       *
       * <p>The computed result is within 1 ulp of the exact result.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 18.9K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

     * @author Louis Wasserman
     */
    public class IntMathRoundingBenchmark {
      private static final int[] positive = new int[ARRAY_SIZE];
      private static final int[] nonzero = new int[ARRAY_SIZE];
      private static final int[] ints = new int[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          positive[i] = randomPositiveBigInteger(Integer.SIZE - 2).intValue();
    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)
  6. guava-tests/benchmark/com/google/common/math/LongMathRoundingBenchmark.java

      RoundingMode mode;
    
      private static final long[] positive = new long[ARRAY_SIZE];
      private static final long[] nonzero = new long[ARRAY_SIZE];
      private static final long[] longs = new long[ARRAY_SIZE];
    
      @BeforeExperiment
      void setUp() {
        for (int i = 0; i < ARRAY_SIZE; i++) {
          positive[i] = randomPositiveBigInteger(Long.SIZE - 2).longValue();
    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)
  7. android/guava-tests/test/com/google/common/math/IntMathTest.java

          }
        }
      }
    
      public void testGCD() {
        for (int a : POSITIVE_INTEGER_CANDIDATES) {
          for (int b : POSITIVE_INTEGER_CANDIDATES) {
            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(IntMath.gcd(a, b)));
          }
        }
      }
    
      public void testGCDZero() {
        for (int a : POSITIVE_INTEGER_CANDIDATES) {
          assertEquals(a, IntMath.gcd(a, 0));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 07 17:50:39 GMT 2024
    - 24.5K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/math/DoubleUtilsTest.java

        assertEquals(0.0, DoubleUtils.ensureNonNegative(0.0));
        for (double positiveValue : POSITIVE_FINITE_DOUBLE_CANDIDATES) {
          assertEquals(positiveValue, DoubleUtils.ensureNonNegative(positiveValue));
          assertEquals(0.0, DoubleUtils.ensureNonNegative(-positiveValue));
        }
        assertEquals(Double.POSITIVE_INFINITY, DoubleUtils.ensureNonNegative(Double.POSITIVE_INFINITY));
        assertEquals(0.0, DoubleUtils.ensureNonNegative(Double.NEGATIVE_INFINITY));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 2.9K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/math/DoubleUtils.java

    package com.google.common.math;
    
    import static com.google.common.base.Preconditions.checkArgument;
    import static java.lang.Double.MAX_EXPONENT;
    import static java.lang.Double.MIN_EXPONENT;
    import static java.lang.Double.POSITIVE_INFINITY;
    import static java.lang.Double.doubleToRawLongBits;
    import static java.lang.Double.isNaN;
    import static java.lang.Double.longBitsToDouble;
    import static java.lang.Math.getExponent;
    
    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)
  10. android/guava-tests/test/com/google/common/math/LongMathTest.java

          }
        }
      }
    
      public void testGCDExhaustive() {
        for (long a : POSITIVE_LONG_CANDIDATES) {
          for (long b : POSITIVE_LONG_CANDIDATES) {
            assertEquals(valueOf(a).gcd(valueOf(b)), valueOf(LongMath.gcd(a, b)));
          }
        }
      }
    
      @GwtIncompatible // TODO
      public void testGCDZero() {
        for (long a : POSITIVE_LONG_CANDIDATES) {
          assertEquals(a, LongMath.gcd(a, 0));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Mar 04 20:15:57 GMT 2024
    - 32.5K bytes
    - Viewed (0)
Back to top