Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for multiplication (0.07 sec)

  1. 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;
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 13.5K bytes
    - Viewed (0)
  2. 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);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  3. 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));
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.9K bytes
    - Viewed (0)
  4. 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
         *
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 16.6K bytes
    - Viewed (0)
  5. 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());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 25.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/fscc/FileFsFullSizeInformationTest.java

                // When
                int bytesConsumed = fileFsFullSizeInfo.decode(bufferArray, 0, bufferArray.length);
    
                // Then
                assertEquals(32, 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, fileFsFullSizeInfo.getCapacity());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 30.5K bytes
    - Viewed (0)
  7. docs/fr/docs/async.md

    * L'apprentissage automatique (ou **Machine Learning**) : cela nécessite de nombreuses multiplications de matrices et vecteurs. Imaginez une énorme feuille de calcul remplie de nombres que vous multiplierez entre eux tous au même moment.
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:56:21 UTC 2025
    - 25.4K bytes
    - Viewed (0)
  8. docs/en/docs/async.md

    * **Machine Learning**: it normally requires lots of "matrix" and "vector" multiplications. Think of a huge spreadsheet with numbers and multiplying all of them together at the same time.
    Registered: Sun Sep 07 07:19:17 UTC 2025
    - Last Modified: Sun Aug 31 09:56:21 UTC 2025
    - 24K bytes
    - Viewed (0)
Back to top