Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 66 for bigIntegers (0.08 sec)

  1. 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)
  2. android/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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Apr 19 19:24:36 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/primitives/UnsignedLong.java

        return (double) ((value >>> 1) | (value & 1)) * 2.0;
      }
    
      /** Returns the value of this {@code UnsignedLong} as a {@link BigInteger}. */
      public BigInteger bigIntegerValue() {
        BigInteger bigInt = BigInteger.valueOf(value & UNSIGNED_MASK);
        if (value < 0) {
          bigInt = bigInt.setBit(Long.SIZE - 1);
        }
        return bigInt;
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 22 13:09:25 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/primitives/UnsignedLong.java

        return (double) ((value >>> 1) | (value & 1)) * 2.0;
      }
    
      /** Returns the value of this {@code UnsignedLong} as a {@link BigInteger}. */
      public BigInteger bigIntegerValue() {
        BigInteger bigInt = BigInteger.valueOf(value & UNSIGNED_MASK);
        if (value < 0) {
          bigInt = bigInt.setBit(Long.SIZE - 1);
        }
        return bigInt;
      }
    
      @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 22 13:09:25 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       */
      @Override
      public double doubleValue() {
        return longValue();
      }
    
      /** Returns the value of this {@code UnsignedInteger} as a {@link BigInteger}. */
      public BigInteger bigIntegerValue() {
        return BigInteger.valueOf(longValue());
      }
    
      /**
       * Compares this unsigned integer to another unsigned integer. Returns {@code 0} if they are
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/primitives/UnsignedInteger.java

       */
      @Override
      public double doubleValue() {
        return longValue();
      }
    
      /** Returns the value of this {@code UnsignedInteger} as a {@link BigInteger}. */
      public BigInteger bigIntegerValue() {
        return BigInteger.valueOf(longValue());
      }
    
      /**
       * Compares this unsigned integer to another unsigned integer. Returns {@code 0} if they are
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  7. 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)
  8. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        return source.readByte().toInt() != 0
      }
    
      fun readBigInteger(): BigInteger {
        if (bytesLeft == 0L) throw ProtocolException("unexpected length: $bytesLeft at $this")
        val byteArray = source.readByteArray(bytesLeft)
        return BigInteger(byteArray)
      }
    
      fun readLong(): Long {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  9. 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)
  10. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

        fun serialNumber(serialNumber: BigInteger) =
          apply {
            this.serialNumber = serialNumber
          }
    
        /** Sets this certificate's serial number. If unset the serial number will be 1. */
        fun serialNumber(serialNumber: Long) =
          apply {
            serialNumber(BigInteger.valueOf(serialNumber))
          }
    
        /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 21.6K bytes
    - Viewed (0)
Back to top