- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 490 for unnecessary (0.23 sec)
-
guava-tests/test/com/google/common/math/LongMathTest.java
} catch (ArithmeticException expected) { // do nothing } if (expectedDouble != null) { assertThat(LongMath.roundToDouble(candidate, UNNECESSARY)).isEqualTo(expectedDouble); } else { try { LongMath.roundToDouble(candidate, UNNECESSARY);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Mon Mar 04 20:15:57 GMT 2024 - 32.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/LongMathTest.java
} catch (ArithmeticException expected) { // do nothing } if (expectedDouble != null) { assertThat(LongMath.roundToDouble(candidate, UNNECESSARY)).isEqualTo(expectedDouble); } else { try { LongMath.roundToDouble(candidate, UNNECESSARY);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Mar 04 20:15:57 GMT 2024 - 32.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigDecimalMathTest.java
if (!expectedValues.containsKey(UNNECESSARY)) { assertWithMessage("Expected roundUnnecessaryShouldThrow call") .that(unnecessaryShouldThrow) .isTrue(); assertThrows( "Expected ArithmeticException for roundToDouble(" + input + ", UNNECESSARY)", ArithmeticException.class, () -> BigDecimalMath.roundToDouble(input, UNNECESSARY)); } } }
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 10.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
// every mode except UNNECESSARY BigDecimal expected = new BigDecimal(d).setScale(0, UNNECESSARY); boolean isInBounds = expected.compareTo(MAX_LONG_AS_BIG_DECIMAL) <= 0 & expected.compareTo(MIN_LONG_AS_BIG_DECIMAL) >= 0; try { assertEquals(expected.longValue(), DoubleMath.roundToLong(d, UNNECESSARY)); assertTrue(isInBounds);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/DoubleMathTest.java
// every mode except UNNECESSARY BigDecimal expected = new BigDecimal(d).setScale(0, UNNECESSARY); boolean isInBounds = expected.compareTo(MAX_LONG_AS_BIG_DECIMAL) <= 0 & expected.compareTo(MIN_LONG_AS_BIG_DECIMAL) >= 0; try { assertEquals(expected.longValue(), DoubleMath.roundToLong(d, UNNECESSARY)); assertTrue(isInBounds);
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} if (!expectedValues.containsKey(UNNECESSARY)) { assertWithMessage("Expected roundUnnecessaryShouldThrow call") .that(unnecessaryShouldThrow) .isTrue(); try { BigIntegerMath.roundToDouble(input, UNNECESSARY); fail("Expected ArithmeticException for roundToDouble(" + input + ", UNNECESSARY)"); } catch (ArithmeticException expected) {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java
} if (!expectedValues.containsKey(UNNECESSARY)) { assertWithMessage("Expected roundUnnecessaryShouldThrow call") .that(unnecessaryShouldThrow) .isTrue(); try { BigIntegerMath.roundToDouble(input, UNNECESSARY); fail("Expected ArithmeticException for roundToDouble(" + input + ", UNNECESSARY)"); } catch (ArithmeticException expected) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 28.2K bytes - Viewed (0) -
android/guava/src/com/google/common/math/ToDoubleRounder.java
case UP: return roundArbitrarily; case UNNECESSARY: throw new ArithmeticException(x + " cannot be represented precisely as a double"); } } X roundArbitrarilyAsX = toX(roundArbitrarily, RoundingMode.UNNECESSARY); int cmpXToRoundArbitrarily = x.compareTo(roundArbitrarilyAsX); switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(cmpXToRoundArbitrarily == 0);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 5.8K bytes - Viewed (0) -
android/guava/src/com/google/common/math/IntMath.java
* @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} * is not a power of two */ @SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally public static int log2(int x, RoundingMode mode) { checkPositive("x", x); switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x)); // fall through
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 23.5K bytes - Viewed (0) -
android/guava/src/com/google/common/math/DoubleMath.java
static double roundIntermediate(double x, RoundingMode mode) { if (!isFinite(x)) { throw new ArithmeticException("input is infinite or NaN"); } switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isMathematicalInteger(x)); return x; case FLOOR: if (x >= 0.0 || isMathematicalInteger(x)) { return x; } else {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 07 17:50:39 GMT 2024 - 18.9K bytes - Viewed (0)