- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 325 for signum (0.16 sec)
-
guava-tests/test/com/google/common/primitives/UnsignedBytesTest.java
for (int j = 0; j < VALUES.length; j++) { byte x = VALUES[i]; byte y = VALUES[j]; // note: spec requires only that the sign is the same assertWithMessage(x + ", " + y) .that(Math.signum(Ints.compare(i, j))) .isEqualTo(Math.signum(UnsignedBytes.compare(x, y))); } } } public void testMax_noArgs() {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 13.4K bytes - Viewed (0) -
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:
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 44.6K bytes - Viewed (0) -
android/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
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 18.9K bytes - Viewed (0) -
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) { try {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.1K bytes - Viewed (0) -
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()); } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 23 18:45:50 GMT 2023 - 8.3K bytes - Viewed (0) -
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()); } /**
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Apr 22 13:09:25 GMT 2021 - 8.9K bytes - Viewed (0) -
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) { try {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
BigIntegerMath.SQRT2_PRECOMPUTED_BITS); } public void testIsPowerOfTwo() { for (BigInteger x : ALL_BIGINTEGER_CANDIDATES) { // Checks for a single bit set. boolean expected = x.signum() > 0 & x.and(x.subtract(ONE)).equals(ZERO); assertEquals(expected, BigIntegerMath.isPowerOfTwo(x)); } } public void testLog2ZeroAlwaysThrows() { for (RoundingMode mode : ALL_ROUNDING_MODES) {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
BigIntegerMath.SQRT2_PRECOMPUTED_BITS); } public void testIsPowerOfTwo() { for (BigInteger x : ALL_BIGINTEGER_CANDIDATES) { // Checks for a single bit set. boolean expected = x.signum() > 0 & x.and(x.subtract(ONE)).equals(ZERO); assertEquals(expected, BigIntegerMath.isPowerOfTwo(x)); } } public void testLog2ZeroAlwaysThrows() { for (RoundingMode mode : ALL_ROUNDING_MODES) {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
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();
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Tue Feb 20 17:00:05 GMT 2024 - 24.7K bytes - Viewed (0)