Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 66 for BigInteger (0.1 sec)

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

          }
        }
      }
    
      private static final BigInteger MAX_INT = BigInteger.valueOf(Integer.MAX_VALUE);
      private static final BigInteger MIN_INT = BigInteger.valueOf(Integer.MIN_VALUE);
    
      private static int saturatedCast(BigInteger big) {
        if (big.compareTo(MAX_INT) > 0) {
          return Integer.MAX_VALUE;
        }
        if (big.compareTo(MIN_INT) < 0) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/net/InetAddresses.java

       * Returns the {@code Inet4Address} corresponding to a given {@code BigInteger}.
       *
       * @param address BigInteger representing the IPv4 address
       * @return Inet4Address representation of the given BigInteger
       * @throws IllegalArgumentException if the BigInteger is not between 0 and 2^32-1
       * @since 28.2
       */
      public static Inet4Address fromIPv4BigInteger(BigInteger address) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 47.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/math/MathTesting.java

            @Override
            public Long apply(Long x) {
              return -x;
            }
          };
    
      private static final Function<BigInteger, BigInteger> NEGATE_BIGINT =
          new Function<BigInteger, BigInteger>() {
            @Override
            public BigInteger apply(BigInteger x) {
              return x.negate();
            }
          };
    
      /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/math/MathTesting.java

            @Override
            public Long apply(Long x) {
              return -x;
            }
          };
    
      private static final Function<BigInteger, BigInteger> NEGATE_BIGINT =
          new Function<BigInteger, BigInteger>() {
            @Override
            public BigInteger apply(BigInteger x) {
              return x.negate();
            }
          };
    
      /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 10 19:45:10 UTC 2022
    - 11.2K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/math/BigIntegerMathBenchmark.java

        }
      }
    
      /** Previous version of BigIntegerMath.factorial, kept for timing purposes. */
      private static BigInteger oldSlowFactorial(int n) {
        if (n <= 20) {
          return BigInteger.valueOf(LongMath.factorial(n));
        } else {
          int k = 20;
          return BigInteger.valueOf(LongMath.factorial(k)).multiply(oldSlowFactorial(k, n));
        }
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Aug 19 16:21:24 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  6. guava/src/com/google/common/collect/DiscreteDomain.java

        }
    
        @Override
        public BigInteger previous(BigInteger value) {
          return value.subtract(BigInteger.ONE);
        }
    
        @Override
        BigInteger offset(BigInteger origin, long distance) {
          checkNonnegative(distance, "distance");
          return origin.add(BigInteger.valueOf(distance));
        }
    
        @Override
        public long distance(BigInteger start, BigInteger end) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 22 21:19:52 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/math/MathPreconditionsTest.java

            () -> MathPreconditions.checkPositive("BigInteger", BigInteger.ZERO));
      }
    
      public void testCheckPositive_positiveBigInteger() {
        MathPreconditions.checkPositive("BigInteger", BigInteger.ONE);
      }
    
      public void testCheckPositive_negativeBigInteger() {
        assertThrows(
            IllegalArgumentException.class,
            () -> MathPreconditions.checkPositive("BigInteger", BigInteger.ZERO.negate()));
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 8K bytes
    - Viewed (0)
  8. src/main/java/org/codelibs/fess/util/MemoryUtil.java

        public static String byteCountToDisplaySize(final long size) {
            return byteCountToDisplaySize(BigInteger.valueOf(size));
        }
    
        private static String byteCountToDisplaySize(final BigInteger size) {
            Objects.requireNonNull(size, "size");
            final String displaySize;
    
            if (size.divide(ONE_EB_BI).compareTo(BigInteger.ZERO) > 0) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  9. 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];
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jun 30 13:06:20 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  10. 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));
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri May 24 16:44:05 UTC 2024
    - 35.3K bytes
    - Viewed (0)
Back to top