- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for checkedMultiply (0.05 sec)
-
android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java
try { int unused = IntMath.checkedMultiply(a, b); return true; } catch (ArithmeticException e) { return false; } } @Override public boolean noMulOverflow(long a, long b) { try { long unused = LongMath.checkedMultiply(a, b); return true; } catch (ArithmeticException e) {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Jul 14 14:44:08 UTC 2025 - 6.9K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* b}. * * @throws ArithmeticException if {@code a * b} overflows in signed {@code long} arithmetic */ @InlineMe(replacement = "Math.multiplyExact(a, b)") public static long checkedMultiply(long a, long b) { return Math.multiplyExact(a, b); } /** * Returns the {@code b} to the {@code k}th power, provided it does not overflow. *Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 03 21:01:09 UTC 2025 - 46.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/IntMathTest.java
BigInteger expectedResult = valueOf(a).multiply(valueOf(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { assertEquals(a * b, IntMath.checkedMultiply(a, b)); assertTrue(expectedSuccess); } catch (ArithmeticException e) { assertFalse(expectedSuccess); } } } } public void testCheckedPow() {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 24.1K bytes - Viewed (0)