- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for roundToDouble (0.07 sec)
-
guava-tests/test/com/google/common/math/LongMathTest.java
for (RoundingMode roundingMode : EnumSet.complementOf(EnumSet.of(UNNECESSARY))) { for (long candidate : roundToDoubleTestCandidates) { assertThat(LongMath.roundToDouble(candidate, roundingMode)) .isEqualTo(BigIntegerMath.roundToDouble(BigInteger.valueOf(candidate), roundingMode)); } } } @GwtIncompatible public void testRoundToDoubleAgainstBigIntegerUnnecessary() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 15:00:32 UTC 2024 - 30.6K bytes - Viewed (0) -
guava/src/com/google/common/math/ToDoubleRounder.java
abstract X toX(double d, RoundingMode mode); /** Returns a - b, guaranteed that both arguments are nonnegative. */ abstract X minus(X a, X b); /** Rounds {@code x} to a {@code double}. */ final double roundToDouble(X x, RoundingMode mode) { checkNotNull(x, "x"); checkNotNull(mode, "mode"); double roundArbitrarily = roundToDoubleArbitrarily(x); if (Double.isInfinite(roundArbitrarily)) { switch (mode) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 5.8K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* is not precisely representable as a {@code double} * @since 30.0 */ @GwtIncompatible public static double roundToDouble(BigInteger x, RoundingMode mode) { return BigIntegerToDoubleRounder.INSTANCE.roundToDouble(x, mode); } @GwtIncompatible private static class BigIntegerToDoubleRounder extends ToDoubleRounder<BigInteger> {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 16 17:21:56 UTC 2024 - 18.8K bytes - Viewed (0) -
android/guava/src/com/google/common/math/ToDoubleRounder.java
abstract X toX(double d, RoundingMode mode); /** Returns a - b, guaranteed that both arguments are nonnegative. */ abstract X minus(X a, X b); /** Rounds {@code x} to a {@code double}. */ final double roundToDouble(X x, RoundingMode mode) { checkNotNull(x, "x"); checkNotNull(mode, "mode"); double roundArbitrarily = roundToDoubleArbitrarily(x); if (Double.isInfinite(roundArbitrarily)) { switch (mode) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 07 17:50:39 UTC 2024 - 5.8K bytes - Viewed (0) -
guava/src/com/google/common/math/LongMath.java
* is not precisely representable as a {@code double} * @since 30.0 */ @SuppressWarnings("deprecation") @GwtIncompatible public static double roundToDouble(long x, RoundingMode mode) { // Logic adapted from ToDoubleRounder. double roundArbitrarily = (double) x; long roundArbitrarilyAsLong = (long) roundArbitrarily; int cmpXToRoundArbitrarily;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
* is not precisely representable as a {@code double} * @since 30.0 */ @SuppressWarnings("deprecation") @GwtIncompatible public static double roundToDouble(long x, RoundingMode mode) { // Logic adapted from ToDoubleRounder. double roundArbitrarily = (double) x; long roundArbitrarilyAsLong = (long) roundArbitrarily; int cmpXToRoundArbitrarily;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0)