- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for subtract (0.16 sec)
-
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} 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) {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
guava/src/com/google/common/collect/DiscreteDomain.java
return value.subtract(BigInteger.ONE); } @Override BigInteger offset(BigInteger origin, long distance) { checkNonnegative(distance, "distance"); return origin.add(BigInteger.valueOf(distance)); } @Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 10.4K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/DiscreteDomain.java
return value.subtract(BigInteger.ONE); } @Override BigInteger offset(BigInteger origin, long distance) { checkNonnegative(distance, "distance"); return origin.add(BigInteger.valueOf(distance)); } @Override public long distance(BigInteger start, BigInteger end) { return end.subtract(start).max(MIN_LONG).min(MAX_LONG).longValue(); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Feb 13 17:34:21 UTC 2025 - 10.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
513, Double.MAX_EXPONENT - 1, Double.MAX_EXPONENT, Double.MAX_EXPONENT + 1)) { BigInteger x = ONE.shiftLeft(exponent); bigValues.add(x, x.add(ONE), x.subtract(ONE)); } bigValues.add(new BigInteger("218838949120258359057546633")); // sqrt(2^175) rounded up and // down bigValues.add(new BigInteger("218838949120258359057546634"));
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sun Aug 10 19:54:19 UTC 2025 - 11.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/LongMathTest.java
} @AndroidIncompatible // slow public void testLessThanBranchFree() { for (long x : ALL_LONG_CANDIDATES) { for (long y : ALL_LONG_CANDIDATES) { BigInteger difference = BigInteger.valueOf(x).subtract(BigInteger.valueOf(y)); if (fitsInLong(difference)) { int expected = (x < y) ? 1 : 0; int actual = LongMath.lessThanBranchFree(x, y); assertEquals(expected, actual); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 31.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
.setExpectation(-Double.MAX_VALUE, values()) .test(); } public void testRoundToDouble_minDoubleMinusOne() { BigDecimal minDoubleAsBigDecimal = new BigDecimal(-Double.MAX_VALUE).subtract(BigDecimal.ONE); new RoundToDoubleTester(minDoubleAsBigDecimal) .setExpectation(-Double.MAX_VALUE, DOWN, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN) .setExpectation(Double.NEGATIVE_INFINITY, UP, FLOOR)
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 10.9K bytes - Viewed (0) -
src/main/java/jcifs/internal/smb1/SMB1SigningDigest.java
// in DST if (cfg.getLocalTimezone().inDaylightTime(new Date(t))) { // t also in DST so no correction } else { // t not in DST so subtract 1 hour t -= 3600000; } } else // not in DST if (cfg.getLocalTimezone().inDaylightTime(new Date(t))) { // t is in DST so add 1 hour t += 3600000;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 11.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/IntMathTest.java
} @AndroidIncompatible // slow public void testCheckedSubtract() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { BigInteger expectedResult = valueOf(a).subtract(valueOf(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { assertEquals(a - b, IntMath.checkedSubtract(a, b)); assertTrue(expectedSuccess);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/primitives/UnsignedLongsTest.java
assertThat(UnsignedLongs.parseUnsignedLong("1234567890abcdef", 16)) .isEqualTo(0x1234567890abcdefL); } public void testParseLongWithRadixLimits() { BigInteger max = BigInteger.ZERO.setBit(64).subtract(ONE); // loops through all legal radix values. for (int r = Character.MIN_RADIX; r <= Character.MAX_RADIX; r++) { int radix = r; // tests can successfully parse a number string with this radix.
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 12.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/primitives/LongsTest.java
.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(); assertWithMessage("Min long * 10") .that(Longs.tryParse(BigInteger.valueOf(MIN_VALUE).multiply(BigInteger.TEN).toString())) .isNull();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 28.7K bytes - Viewed (0)