- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 50 for ArithmeticException (0.35 sec)
-
guava-tests/test/com/google/common/math/LongMathTest.java
fail("Expected ArithmeticException"); } catch (ArithmeticException expected) { } } } try { int k = LongMath.biggestSimpleBinomials.length; simpleBinomial(2 * k, k); // 2 * k is the smallest value for which we don't replace k with (n-k). fail("Expected ArithmeticException"); } catch (ArithmeticException expected) { } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
} catch (ArithmeticException expected) { } } } @GwtIncompatible // DoubleMath.roundToInt(double, RoundingMode) public void testRoundInfiniteToIntAlwaysFails() { for (RoundingMode mode : ALL_ROUNDING_MODES) { try { DoubleMath.roundToInt(Double.POSITIVE_INFINITY, mode); fail("Expected ArithmeticException"); } catch (ArithmeticException expected) {
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 28.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/LongMathTest.java
fail("Expected ArithmeticException"); } catch (ArithmeticException expected) { } } } try { int k = LongMath.biggestSimpleBinomials.length; simpleBinomial(2 * k, k); // 2 * k is the smallest value for which we don't replace k with (n-k). fail("Expected ArithmeticException"); } catch (ArithmeticException expected) { } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Mar 04 20:15:57 UTC 2024 - 32.5K bytes - Viewed (0) -
guava/src/com/google/common/math/IntMath.java
* * @throws IllegalArgumentException if {@code x <= 0} * @throws ArithmeticException of the next-higher power of two is not representable as an {@code * int}, i.e. when {@code x > 2^30} * @since 20.0 */ public static int ceilingPowerOfTwo(int x) { checkPositive("x", x); if (x > MAX_SIGNED_POWER_OF_TWO) { throw new ArithmeticException("ceilingPowerOfTwo(" + x + ") not representable as an int"); }
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/IntMathTest.java
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 24.5K bytes - Viewed (0) -
guava/src/com/google/common/base/Internal.java
@ElementTypesAreNonnullByDefault final class Internal { /** * Returns the number of nanoseconds of the given duration without throwing or overflowing. * * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either * {@link Long#MAX_VALUE} or {@link Long#MIN_VALUE}. This behavior can be useful when decomposing
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Thu Jan 11 14:30:06 UTC 2024 - 2K bytes - Viewed (0) -
android/guava/src/com/google/common/math/MathPreconditions.java
static void checkRoundingUnnecessary(boolean condition) { if (!condition) { throw new ArithmeticException("mode was UNNECESSARY, but rounding was necessary"); } } static void checkInRangeForRoundingInputs(boolean condition, double input, RoundingMode mode) { if (!condition) { throw new ArithmeticException( "rounded value is out of range for input " + input + " and rounding mode " + mode); } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/ApacheBenchmark.java
int unused = IntMath.checkedAdd(a, b); return true; } catch (ArithmeticException e) { return false; } } @Override public boolean noAddOverflow(long a, long b) { try { long unused = LongMath.checkedAdd(a, b); return true; } catch (ArithmeticException e) { return false; } } @Override
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 6.9K bytes - Viewed (0) -
guava/src/com/google/common/math/MathPreconditions.java
static void checkRoundingUnnecessary(boolean condition) { if (!condition) { throw new ArithmeticException("mode was UNNECESSARY, but rounding was necessary"); } } static void checkInRangeForRoundingInputs(boolean condition, double input, RoundingMode mode) { if (!condition) { throw new ArithmeticException( "rounded value is out of range for input " + input + " and rounding mode " + mode); } }
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/util/concurrent/Internal.java
@ElementTypesAreNonnullByDefault final class Internal { /** * Returns the number of nanoseconds of the given duration without throwing or overflowing. * * <p>Instead of throwing {@link ArithmeticException}, this method silently saturates to either * {@link Long#MAX_VALUE} or {@link Long#MIN_VALUE}. This behavior can be useful when decomposing
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Apr 04 09:45:04 UTC 2023 - 1.7K bytes - Viewed (0)