Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for bitLength (0.29 sec)

  1. android/guava/src/com/google/common/math/DoubleUtils.java

      }
    
      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();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  2. guava/src/com/google/common/math/DoubleUtils.java

      }
    
      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();
        } else if (exponent > MAX_EXPONENT) {
          return x.signum() * POSITIVE_INFINITY;
        }
    
        /*
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       */
      public static UnsignedInteger valueOf(BigInteger value) {
        checkNotNull(value);
        checkArgument(
            value.signum() >= 0 && value.bitLength() <= Integer.SIZE,
            "value (%s) is outside the range for an unsigned integer value",
            value);
        return fromIntBits(value.intValue());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. guava/src/com/google/common/primitives/UnsignedInteger.java

       */
      public static UnsignedInteger valueOf(BigInteger value) {
        checkNotNull(value);
        checkArgument(
            value.signum() >= 0 && value.bitLength() <= Integer.SIZE,
            "value (%s) is outside the range for an unsigned integer value",
            value);
        return fromIntBits(value.intValue());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 23 18:45:50 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/UnsignedLong.java

       */
      @CanIgnoreReturnValue
      public static UnsignedLong valueOf(BigInteger value) {
        checkNotNull(value);
        checkArgument(
            value.signum() >= 0 && value.bitLength() <= Long.SIZE,
            "value (%s) is outside the range for an unsigned long value",
            value);
        return fromLongBits(value.longValue());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 22 13:09:25 UTC 2021
    - 8.9K bytes
    - Viewed (0)
  6. guava/src/com/google/common/primitives/UnsignedLong.java

       */
      @CanIgnoreReturnValue
      public static UnsignedLong valueOf(BigInteger value) {
        checkNotNull(value);
        checkArgument(
            value.signum() >= 0 && value.bitLength() <= Long.SIZE,
            "value (%s) is outside the range for an unsigned long value",
            value);
        return fromLongBits(value.longValue());
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Apr 22 13:09:25 UTC 2021
    - 8.9K bytes
    - Viewed (0)
Back to top