- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for checkNoOverflow (0.27 sec)
-
android/guava/src/com/google/common/math/MathPreconditions.java
} } static void checkNoOverflow(boolean condition, String methodName, int a, int b) { if (!condition) { throw new ArithmeticException("overflow: " + methodName + "(" + a + ", " + b + ")"); } } static void checkNoOverflow(boolean condition, String methodName, long a, long b) { if (!condition) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.3K bytes - Viewed (0) -
guava/src/com/google/common/math/MathPreconditions.java
} } static void checkNoOverflow(boolean condition, String methodName, int a, int b) { if (!condition) { throw new ArithmeticException("overflow: " + methodName + "(" + a + ", " + b + ")"); } } static void checkNoOverflow(boolean condition, String methodName, long a, long b) { if (!condition) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.3K bytes - Viewed (0) -
guava/src/com/google/common/math/IntMath.java
return (k == 0) ? 1 : 0; case 1: return 1; case (-1): return ((k & 1) == 0) ? 1 : -1; case 2: checkNoOverflow(k < Integer.SIZE - 1, "checkedPow", b, k); return 1 << k; case (-2): checkNoOverflow(k < Integer.SIZE, "checkedPow", b, k); return ((k & 1) == 0) ? 1 << k : -1 << k; default: // continue below to handle the general case
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/IntMath.java
return (k == 0) ? 1 : 0; case 1: return 1; case (-1): return ((k & 1) == 0) ? 1 : -1; case 2: checkNoOverflow(k < Integer.SIZE - 1, "checkedPow", b, k); return 1 << k; case (-2): checkNoOverflow(k < Integer.SIZE, "checkedPow", b, k); return ((k & 1) == 0) ? 1 << k : -1 << k; default: // continue below to handle the general case
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 23.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathPreconditionsTest.java
} } public void testCheckNoOverflow_success() { MathPreconditions.checkNoOverflow(true, "testCheckNoOverflow_success", 0, 0); } public void testCheckNoOverflow_failure() { try { MathPreconditions.checkNoOverflow(false, "testCheckNoOverflow_failure", 0, 0); fail(); } catch (ArithmeticException expected) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 8.2K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
*/ if (leadingZeros > Long.SIZE + 1) { return a * b; } checkNoOverflow(leadingZeros >= Long.SIZE, "checkedMultiply", a, b); checkNoOverflow(a >= 0 | b != Long.MIN_VALUE, "checkedMultiply", a, b); long result = a * b; checkNoOverflow(a == 0 || result / a == b, "checkedMultiply", a, b); return result; } /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 44.6K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
*/ if (leadingZeros > Long.SIZE + 1) { return a * b; } checkNoOverflow(leadingZeros >= Long.SIZE, "checkedMultiply", a, b); checkNoOverflow(a >= 0 | b != Long.MIN_VALUE, "checkedMultiply", a, b); long result = a * b; checkNoOverflow(a == 0 || result / a == b, "checkedMultiply", a, b); return result; } /**
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 44.6K bytes - Viewed (0) -
android/guava/src/com/google/common/primitives/Longs.java
length += array.length; } long[] result = new long[checkNoOverflow(length)]; int pos = 0; for (long[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } private static int checkNoOverflow(long result) { checkArgument( result == (int) result,
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 15 16:12:13 UTC 2024 - 28.7K bytes - Viewed (0) -
guava/src/com/google/common/primitives/Longs.java
length += array.length; } long[] result = new long[checkNoOverflow(length)]; int pos = 0; for (long[] array : arrays) { System.arraycopy(array, 0, result, pos, array.length); pos += array.length; } return result; } private static int checkNoOverflow(long result) { checkArgument( result == (int) result,
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Feb 15 16:12:13 UTC 2024 - 28.8K bytes - Viewed (0)