- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 71 for roundUp (0.19 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt
assertFailsWith<EOFException> { source.buffer().readByteString(101) } } @Test fun blockedStreamDoesntStarveNewStream() { val framesThatFillWindow = roundUp(Settings.DEFAULT_INITIAL_WINDOW_SIZE, peer.maxOutboundDataLength()) // Write the mocking script. This accepts more data frames than necessary! peer.sendFrame().settings(Settings())
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 75.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
int x = 1 << exponent; intValues.add(x, x + 1, x - 1); } intValues.add(9999).add(10000).add(10001).add(1000000); // near powers of 10 intValues.add(5792).add(5793); // sqrt(2^25) rounded up and down POSITIVE_INTEGER_CANDIDATES = intValues.build(); NEGATIVE_INTEGER_CANDIDATES = ImmutableList.copyOf( Iterables.concat(
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/src/com/google/common/math/LongMath.java
static int lessThanBranchFree(long x, long y) { // Returns the sign bit of x - y. return (int) (~~(x - y) >>> (Long.SIZE - 1)); } /** * Returns the base-2 logarithm of {@code x}, rounded according to the specified rounding mode. * * @throws IllegalArgumentException if {@code x <= 0} * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x}
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Aug 29 16:20:07 UTC 2025 - 46.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2SetInfoRequestTest.java
int size = request.size(); // Expected size calculation: size8(SMB2_HEADER_LENGTH + 32 + info.size()) // size8 rounds up to nearest multiple of 8 int expectedRawSize = Smb2Constants.SMB2_HEADER_LENGTH + 32 + 100; int expectedSize = (expectedRawSize + 7) & ~7; // Round up to nearest 8 assertEquals(expectedSize, size); } @Test @DisplayName("Test writeBytesWireFormat method")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
int result = BigIntegerMath.log2(x, HALF_UP); BigInteger x2 = x.pow(2); // x^2 < 2^(2 * result + 1), or else we would have rounded up assertTrue(ZERO.setBit(2 * result + 1).compareTo(x2) > 0); // x^2 >= 2^(2 * result - 1), or else we would have rounded down assertTrue(result == 0 || ZERO.setBit(2 * result - 1).compareTo(x2) <= 0); } } public void testLog2HalfDown() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
android/guava/src/com/google/common/math/Quantiles.java
// Since scale is a positive int, index is in [0, scale], and (dataset.length - 1) is a // non-negative int, we can do long-arithmetic on index * (dataset.length - 1) / scale to get // a rounded ratio and a remainder which can be expressed as ints, without risk of overflow: int quotient = (int) LongMath.divide(numerator, scale, RoundingMode.DOWN); int remainder = (int) (numerator - (long) quotient * scale);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 30.1K bytes - Viewed (0) -
src/test/java/jcifs/spnego/NegTokenTargTest.java
import org.junit.jupiter.api.Test; /** * Unit tests for {@link NegTokenTarg}. The class has no external * collaborators so tests are mostly focused on round‑trip * serialisation and invalid input handling. */ class NegTokenTargTest { @Test @DisplayName("happy path – full token round‑trip") void testRoundTripFull() throws IOException { // Arrange – create a fully populated token
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/util/HexdumpTest.java
assertEquals("0A", Hexdump.toHexString(data3, 0, 2)); // 2 chars = 1 byte assertEquals("0A0", Hexdump.toHexString(data3, 0, 3)); // 3 chars = 1.5 bytes (rounds up to 2) assertEquals("0A0B", Hexdump.toHexString(data3, 0, 4)); // 4 chars = 2 bytes assertEquals("0A0B0", Hexdump.toHexString(data3, 0, 5)); // 5 chars = 2.5 bytes (rounds up to 3)
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/util/StringsTest.java
assertTrue(result.length > 0, "Result should not be empty"); // Verify round-trip conversion String roundTrip = new String(result, StandardCharsets.UTF_16LE); assertEquals(UNICODE_STRING, roundTrip, "Round-trip conversion should preserve Unicode"); } @Test @DisplayName("getASCIIBytes should encode string as ASCII")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.6K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
public static boolean isPowerOfTwo(BigInteger x) { checkNotNull(x); return x.signum() > 0 && x.getLowestSetBit() == x.bitLength() - 1; } /** * Returns the base-2 logarithm of {@code x}, rounded according to the specified rounding mode. * * @throws IllegalArgumentException if {@code x <= 0} * @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x}
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K bytes - Viewed (0)