Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 334 for signum (0.1 sec)

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

            int expected = DoubleMath.fuzzyEquals(a, b, tolerance) ? 0 : Double.compare(a, b);
            int actual = DoubleMath.fuzzyCompare(a, b, tolerance);
            assertEquals(Integer.signum(expected), Integer.signum(actual));
          }
        }
      }
    
      public void testFuzzyCompareBadTolerance() {
        for (double tolerance : BAD_TOLERANCE_CANDIDATES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/math/LongMath.java

         * deal with the cases where rounding towards 0 is wrong, which typically depends on the sign of
         * p / q.
         *
         * signum is 1 if p and q are both nonnegative or both negative, and -1 otherwise.
         */
        int signum = 1 | (int) ((p ^ q) >> (Long.SIZE - 1));
        boolean increment;
        switch (mode) {
          case UNNECESSARY:
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/primitives/CharsTest.java

              .isTrue();
        }
      }
    
      public void testCompare() {
        for (char x : VALUES) {
          for (char y : VALUES) {
            assertWithMessage(x + ", " + y)
                .that(Math.signum(Chars.compare(x, y)))
                .isEqualTo(Math.signum(Character.valueOf(x).compareTo(y)));
          }
        }
      }
    
      public void testContains() {
        assertThat(Chars.contains(EMPTY, (char) 1)).isFalse();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/math/LongMath.java

         * deal with the cases where rounding towards 0 is wrong, which typically depends on the sign of
         * p / q.
         *
         * signum is 1 if p and q are both nonnegative or both negative, and -1 otherwise.
         */
        int signum = 1 | (int) ((p ^ q) >> (Long.SIZE - 1));
        boolean increment;
        switch (mode) {
          case UNNECESSARY:
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 09 16:39:37 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  5. guava/src/com/google/common/math/BigIntegerMath.java

        @Override
        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
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 16 17:21:56 UTC 2024
    - 18.8K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/math/DoubleMathTest.java

            int expected = DoubleMath.fuzzyEquals(a, b, tolerance) ? 0 : Double.compare(a, b);
            int actual = DoubleMath.fuzzyCompare(a, b, tolerance);
            assertEquals(Integer.signum(expected), Integer.signum(actual));
          }
        }
      }
    
      public void testFuzzyCompareBadTolerance() {
        for (double tolerance : BAD_TOLERANCE_CANDIDATES) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 27.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/primitives/UnsignedInteger.java

       *
       * @throws IllegalArgumentException if {@code value} is negative or {@code value >= 2^32}
       */
      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)
  8. guava/src/com/google/common/primitives/UnsignedInteger.java

       *
       * @throws IllegalArgumentException if {@code value} is negative or {@code value >= 2^32}
       */
      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)
  9. 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)
  10. 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