- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for roundUp (0.06 sec)
-
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) -
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) -
src/test/java/jcifs/spnego/NegTokenInitTest.java
assertArrayEquals(mechs, parsed.getMechanisms(), "Mechanism OIDs should round-trip"); assertEquals(flags, parsed.getContextFlags(), "Flags should round-trip"); assertArrayEquals(mechToken, parsed.getMechanismToken(), "Mechanism token should round-trip"); assertArrayEquals(mic, parsed.getMechanismListMIC(), "MIC should round-trip"); assertTrue(parsed.getContextFlag(NegTokenInit.DELEGATION));
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 21K bytes - Viewed (0) -
src/test/java/jcifs/smb1/dcerpc/ndr/NdrHyperTest.java
* The buffer is created with enough capacity for a 64‑bit value. */ @ExtendWith(MockitoExtension.class) public class NdrHyperTest { /** * Tests a simple round‑trip encode → decode retains the original value. */ @Test @DisplayName("Basic round‑trip for a fixed value") public void testEncodeRoundTrip() throws NdrException { final long original = 0x1122334455667788L;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.3K bytes - Viewed (0)