- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for roundToDouble (0.06 sec)
-
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
tmp += BigIntegerMath.divide(nonzero1[j], nonzero2[j], mode).intValue(); } return tmp; } @Benchmark long roundToDouble(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += Double.doubleToRawLongBits(BigIntegerMath.roundToDouble(nonzero1[j], mode)); } return tmp; }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.9K bytes - Viewed (0) -
android/guava/src/com/google/common/math/BigDecimalMath.java
* is not precisely representable as a {@code double} * @since 30.0 */ public static double roundToDouble(BigDecimal x, RoundingMode mode) { return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(x, mode); } private static final class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 3K bytes - Viewed (0) -
guava/src/com/google/common/math/BigDecimalMath.java
* is not precisely representable as a {@code double} * @since 30.0 */ public static double roundToDouble(BigDecimal x, RoundingMode mode) { return BigDecimalToDoubleRounder.INSTANCE.roundToDouble(x, mode); } private static final class BigDecimalToDoubleRounder extends ToDoubleRounder<BigDecimal> {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
RoundingMode mode = entry.getKey(); Double expectation = entry.getValue(); assertWithMessage("roundToDouble(%s, %s)", input, mode) .that(BigDecimalMath.roundToDouble(input, mode)) .isEqualTo(expectation); } if (!expectedValues.containsKey(UNNECESSARY)) { assertWithMessage("Expected roundUnnecessaryShouldThrow call")
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Nov 19 01:35:24 UTC 2025 - 11K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
tmp += BigIntegerMath.divide(nonzero1[j], nonzero2[j], mode).intValue(); } return tmp; } @Benchmark long roundToDouble(int reps) { long tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += Double.doubleToRawLongBits(BigIntegerMath.roundToDouble(nonzero1[j], mode)); } return tmp; }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
RoundingMode mode = entry.getKey(); Double expectation = entry.getValue(); assertWithMessage("roundToDouble(%s, %s)", input, mode) .that(BigIntegerMath.roundToDouble(input, mode)) .isEqualTo(expectation); } if (!expectedValues.containsKey(UNNECESSARY)) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Nov 19 01:35:24 UTC 2025 - 27.1K 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 final class BigIntegerToDoubleRounder extends ToDoubleRounder<BigInteger> {Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K 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 Dec 26 12:43:10 UTC 2025 - Last Modified: Sat Dec 21 03:10:51 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 */ @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 Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Nov 03 21:01:09 UTC 2025 - 46.8K bytes - Viewed (0)