- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for multiplication (0.09 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/main/java/jcifs/util/InputValidator.java
} /** * Safe integer multiplication with overflow check * * @param a first operand * @param b second operand * @return product of a and b * @throws ArithmeticException if overflow occurs */ public static int safeMultiply(int a, int b) { validateIntegerMultiplication(a, b, "Multiplication"); return a * b; } /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 13.5K bytes - Click Count (0) -
src/main/java/jcifs/internal/smb2/rdma/RdmaErrorHandler.java
int safeShift = Math.min(MAX_BACKOFF_SHIFT, Math.max(0, retryCount - 1)); long multiplier = 1L << safeShift; // Check for potential overflow before multiplication long delay = (retryDelayMs > Long.MAX_VALUE / multiplier) ? MAX_RETRY_DELAY : Math.min(MAX_RETRY_DELAY, retryDelayMs * multiplier); Thread.sleep(delay);
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 10.5K bytes - Click Count (0) -
android/guava/src/com/google/common/hash/BloomFilterStrategies.java
return true; } }, /** * This strategy uses all 128 bits of {@link Hashing#murmur3_128} when hashing. It looks different * from the implementation in MURMUR128_MITZ_32 because we're avoiding the multiplication in the * loop and doing a (much simpler) += hash2. We're also changing the index to a positive number by * AND'ing with Long.MAX_VALUE instead of flipping the bits. */ MURMUR128_MITZ_64() { @OverrideCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 10.7K bytes - Click Count (0) -
src/test/java/jcifs/util/InputValidatorTest.java
assertThrows(ArithmeticException.class, () -> InputValidator.safeAdd(Integer.MIN_VALUE, -1)); } @Test @DisplayName("Test safe integer multiplication") void testSafeMultiplication() { assertEquals(100, InputValidator.safeMultiply(10, 10)); assertEquals(-100, InputValidator.safeMultiply(10, -10));
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 11.9K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java
assertEquals(1, future.get(-1, SECONDS).intValue()); } @J2ktIncompatible @GwtIncompatible // threads public void testOverflowTimeout() throws Exception { // First, sanity check that naive multiplication would really overflow to a negative number: long nanosPerSecond = NANOSECONDS.convert(1, SECONDS); assertThat(nanosPerSecond * Long.MAX_VALUE).isLessThan(0L);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 16.3K bytes - Click Count (0) -
src/main/java/jcifs/util/ServerResponseValidator.java
if (result > Integer.MAX_VALUE || result < Integer.MIN_VALUE) { failedValidations.incrementAndGet(); integerOverflowsPrevented.incrementAndGet(); log.warn("Integer overflow in multiplication: {} * {} = {}", a, b, result); throw new SmbException("Integer overflow detected"); } return (int) result; } /** * Validate SMB message size *
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 16.6K bytes - Click Count (0) -
android/guava/src/com/google/common/math/PairedStatsAccumulator.java
double ySumOfSquaresOfDeltas = yStats.sumOfSquaresOfDeltas(); checkState(xSumOfSquaresOfDeltas > 0.0); checkState(ySumOfSquaresOfDeltas > 0.0); // The product of two positive numbers can be zero if the multiplication underflowed. We // force a positive value by effectively rounding up to MIN_VALUE. double productOfSumsOfSquaresOfDeltas = ensurePositive(xSumOfSquaresOfDeltas * ySumOfSquaresOfDeltas);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Sep 08 18:35:13 GMT 2025 - 10.4K bytes - Click Count (0) -
android/guava/src/com/google/common/math/PairedStats.java
double ySumOfSquaresOfDeltas = yStats().sumOfSquaresOfDeltas(); checkState(xSumOfSquaresOfDeltas > 0.0); checkState(ySumOfSquaresOfDeltas > 0.0); // The product of two positive numbers can be zero if the multiplication underflowed. We // force a positive value by effectively rounding up to MIN_VALUE. double productOfSumsOfSquaresOfDeltas = ensurePositive(xSumOfSquaresOfDeltas * ySumOfSquaresOfDeltas);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Jul 08 18:32:10 GMT 2025 - 12.6K bytes - Click Count (0) -
src/test/java/jcifs/internal/fscc/FileFsSizeInformationTest.java
// When int bytesConsumed = fileFsSizeInfo.decode(bufferArray, 0, bufferArray.length); // Then assertEquals(24, bytesConsumed); // Note: multiplication may overflow, but that's expected behavior long expectedCapacity = Long.MAX_VALUE * (long) Integer.MAX_VALUE * (long) Integer.MAX_VALUE; assertEquals(expectedCapacity, fileFsSizeInfo.getCapacity());Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 25.9K bytes - Click Count (0) -
android/guava/src/com/google/common/math/BigIntegerMath.java
// Strip off 2s from this value. int shift = Long.numberOfTrailingZeros(product); product >>= shift; // Use floor(log2(num)) + 1 to prevent overflow of multiplication. int productBits = LongMath.log2(product, FLOOR) + 1; int bits = LongMath.log2(startingNumber, FLOOR) + 1; // Check for the next power of two boundary, to save us a CLZ operation.Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 18.8K bytes - Click Count (0)