Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 82 for BigInteger (0.27 sec)

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

      }
    
      private static boolean fitsInLong(BigInteger big) {
        return big.bitLength() <= 63;
      }
    
      private static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE);
      private static final BigInteger MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE);
    
      private static long saturatedCast(BigInteger big) {
        if (big.compareTo(MAX_LONG) > 0) {
          return Long.MAX_VALUE;
        }
    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)
  2. android/guava-tests/test/com/google/common/math/LongMathTest.java

      }
    
      private static boolean fitsInLong(BigInteger big) {
        return big.bitLength() <= 63;
      }
    
      private static final BigInteger MAX_LONG = BigInteger.valueOf(Long.MAX_VALUE);
      private static final BigInteger MIN_LONG = BigInteger.valueOf(Long.MIN_VALUE);
    
      private static long saturatedCast(BigInteger big) {
        if (big.compareTo(MAX_LONG) > 0) {
          return Long.MAX_VALUE;
        }
    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)
  3. guava-tests/test/com/google/common/math/MathBenchmarking.java

       * range uniformly at random. Zero is treated as having log2 == 0.
       */
      static BigInteger randomNonNegativeBigInteger(int numBits) {
        int digits = RANDOM_SOURCE.nextInt(numBits);
        if (digits == 0) {
          return new BigInteger(1, RANDOM_SOURCE);
        } else {
          return new BigInteger(digits, RANDOM_SOURCE).setBit(digits);
        }
      }
    
      /**
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

        MathPreconditions.checkNonNegative("BigInteger", BigInteger.ZERO);
      }
    
      public void testCheckNonNegative_positiveBigInteger() {
        MathPreconditions.checkNonNegative("BigInteger", BigInteger.ONE);
      }
    
      public void testCheckNonNegative_negativeBigInteger() {
        try {
          MathPreconditions.checkNonNegative("int", BigInteger.ONE.negate());
          fail();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/math/MathTesting.java

       */
      static final ImmutableSet<BigInteger> POSITIVE_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> NEGATIVE_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> NONZERO_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> ALL_BIGINTEGER_CANDIDATES;
    
      static {
        ImmutableSet.Builder<BigInteger> bigValues = ImmutableSet.builder();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/math/MathTesting.java

       */
      static final ImmutableSet<BigInteger> POSITIVE_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> NEGATIVE_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> NONZERO_BIGINTEGER_CANDIDATES;
    
      static final Iterable<BigInteger> ALL_BIGINTEGER_CANDIDATES;
    
      static {
        ImmutableSet.Builder<BigInteger> bigValues = ImmutableSet.builder();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 11.2K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java

    import com.google.caliper.Param;
    import java.math.BigInteger;
    import java.math.RoundingMode;
    
    /**
     * Benchmarks for the rounding methods of {@code BigIntegerMath}.
     *
     * @author Louis Wasserman
     */
    public class BigIntegerMathRoundingBenchmark {
      private static final BigInteger[] nonzero1 = new BigInteger[ARRAY_SIZE];
      private static final BigInteger[] nonzero2 = new BigInteger[ARRAY_SIZE];
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 30 13:06:20 GMT 2020
    - 2.8K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/net/InetAddressesTest.java

        checkBigIntegerConversion("0.0.0.0", BigInteger.ZERO);
        checkBigIntegerConversion("0.0.0.1", BigInteger.ONE);
        checkBigIntegerConversion("127.255.255.255", BigInteger.valueOf(Integer.MAX_VALUE));
        checkBigIntegerConversion(
            "255.255.255.254", BigInteger.valueOf(Integer.MAX_VALUE).multiply(BigInteger.valueOf(2)));
        checkBigIntegerConversion(
            "255.255.255.255", BigInteger.ONE.shiftLeft(32).subtract(BigInteger.ONE));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 31.9K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.math.BigInteger.ONE;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.collect.testing.Helpers;
    import com.google.common.testing.NullPointerTester;
    import java.math.BigInteger;
    import java.util.Arrays;
    import java.util.Comparator;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:36:17 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  10. guava-tests/benchmark/com/google/common/collect/MinMaxPriorityQueueBenchmark.java

      }
    
      /**
       * Does a CPU intensive operation on Integer and returns a BigInteger Used to implement an
       * ordering that spends a lot of cpu.
       */
      static class ExpensiveComputation implements Function<Integer, BigInteger> {
        @Override
        public BigInteger apply(Integer from) {
          BigInteger v = BigInteger.valueOf(from);
          // Math.sin is very slow for values outside 4*pi
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top