Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for bigIntegers (0.13 sec)

  1. guava/src/com/google/common/math/BigIntegerMath.java

        double roundToDoubleArbitrarily(BigInteger bigInteger) {
          return DoubleUtils.bigToDouble(bigInteger);
        }
    
        @Override
        int sign(BigInteger bigInteger) {
          return bigInteger.signum();
        }
    
        @Override
        BigInteger toX(double d, RoundingMode mode) {
          return DoubleMath.roundToBigInteger(d, mode);
        }
    
        @Override
        BigInteger minus(BigInteger a, BigInteger b) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

              .add(doubleConversionTest + i);
          BigInteger bigI = BigInteger.valueOf(i);
          testBigIntegersBuilder
              .add(bigI)
              .add(BigInteger.valueOf(Long.MAX_VALUE).add(bigI))
              .add(BigInteger.valueOf(Long.MIN_VALUE).add(bigI))
              .add(BigInteger.valueOf(Integer.MAX_VALUE).add(bigI))
              .add(BigInteger.valueOf(Integer.MIN_VALUE).add(bigI))
              .add(BigInteger.ONE.shiftLeft(63).add(bigI))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. 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;
        }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  4. android/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)
  5. guava-tests/test/com/google/common/primitives/UnsignedLongTest.java

              .add(doubleConversionTest + i);
          BigInteger bigI = BigInteger.valueOf(i);
          testBigIntegersBuilder
              .add(bigI)
              .add(BigInteger.valueOf(Long.MAX_VALUE).add(bigI))
              .add(BigInteger.valueOf(Long.MIN_VALUE).add(bigI))
              .add(BigInteger.valueOf(Integer.MAX_VALUE).add(bigI))
              .add(BigInteger.valueOf(Integer.MIN_VALUE).add(bigI))
              .add(BigInteger.ONE.shiftLeft(63).add(bigI))
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. guava/src/com/google/common/math/DoubleUtils.java

        long significand = doubleToRawLongBits(x) & SIGNIFICAND_MASK;
        return longBitsToDouble(significand | ONE_BITS);
      }
    
      static double bigToDouble(BigInteger x) {
        // This is an extremely fast implementation of BigInteger.doubleValue(). JDK patch pending.
        BigInteger absX = x.abs();
        int exponent = absX.bitLength() - 1;
        // exponent == floor(log2(abs(x)))
        if (exponent < Long.SIZE - 1) {
          return x.longValue();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/primitives/LongsTest.java

            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).add(BigInteger.ONE).toString()))
            .isNull();
        assertWithMessage("Max long * 10")
            .that(Longs.tryParse(BigInteger.valueOf(MAX_VALUE).multiply(BigInteger.TEN).toString()))
            .isNull();
        assertWithMessage("Min long - 1")
            .that(Longs.tryParse(BigInteger.valueOf(MIN_VALUE).subtract(BigInteger.ONE).toString()))
            .isNull();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.8K bytes
    - Viewed (0)
Back to top