Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for randomPositiveBigInteger (0.37 sec)

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

          return new BigInteger(digits, RANDOM_SOURCE).setBit(digits);
        }
      }
    
      /**
       * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping the sign with 50%
       * probability.
       */
      static BigInteger randomNonZeroBigInteger(int numBits) {
        BigInteger result = randomPositiveBigInteger(numBits);
        return RANDOM_SOURCE.nextBoolean() ? result : result.negate();
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  2. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java

    import static com.google.common.math.MathBenchmarking.ARRAY_SIZE;
    import static com.google.common.math.MathBenchmarking.randomNonZeroBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.math.BigInteger;
    import java.math.RoundingMode;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 30 13:06:20 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/MathBenchmarking.java

          return new BigInteger(digits, RANDOM_SOURCE).setBit(digits);
        }
      }
    
      /**
       * Equivalent to calling randomPositiveBigInteger(numBits) and then flipping the sign with 50%
       * probability.
       */
      static BigInteger randomNonZeroBigInteger(int numBits) {
        BigInteger result = randomPositiveBigInteger(numBits);
        return RANDOM_SOURCE.nextBoolean() ? result : result.negate();
      }
    
      /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.1K bytes
    - Viewed (0)
  4. android/guava-tests/benchmark/com/google/common/math/LongMathRoundingBenchmark.java

    import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
    import static com.google.common.math.MathBenchmarking.randomNonZeroBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.math.RoundingMode;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

    import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
    import static com.google.common.math.MathBenchmarking.randomNonZeroBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.math.RoundingMode;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java

    import static com.google.common.math.MathBenchmarking.RANDOM_SOURCE;
    import static com.google.common.math.MathBenchmarking.randomNonZeroBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.math.RoundingMode;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 2.6K bytes
    - Viewed (0)
  7. guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java

    import static com.google.common.math.MathBenchmarking.ARRAY_SIZE;
    import static com.google.common.math.MathBenchmarking.randomNonZeroBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    import com.google.caliper.Param;
    import java.math.BigInteger;
    import java.math.RoundingMode;
    
    /**
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 30 13:06:20 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  8. guava-tests/benchmark/com/google/common/math/IntMathBenchmark.java

    import static com.google.common.math.MathBenchmarking.randomExponent;
    import static com.google.common.math.MathBenchmarking.randomNonNegativeBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    
    /**
     * Benchmarks for the non-rounding methods of {@code IntMath}.
     *
     * @author Louis Wasserman
     */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.2K bytes
    - Viewed (0)
  9. android/guava-tests/benchmark/com/google/common/math/LongMathBenchmark.java

    import static com.google.common.math.MathBenchmarking.randomExponent;
    import static com.google.common.math.MathBenchmarking.randomNonNegativeBigInteger;
    import static com.google.common.math.MathBenchmarking.randomPositiveBigInteger;
    
    import com.google.caliper.BeforeExperiment;
    import com.google.caliper.Benchmark;
    
    /**
     * Benchmarks for the non-rounding methods of {@code LongMath}.
     *
     * @author Louis Wasserman
     */
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 3.5K bytes
    - Viewed (0)
Back to top