- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for roundToBigInteger (0.06 sec)
-
android/guava-tests/test/com/google/common/math/DoubleMathTest.java
assertEquals(expected.toBigInteger(), DoubleMath.roundToBigInteger(d, UNNECESSARY)); } } @GwtIncompatible // DoubleMath.roundToBigInteger(double, RoundingMode) public void testRoundExactFractionalDoubleToBigIntegerFails() { for (double d : FRACTIONAL_DOUBLE_CANDIDATES) { assertThrows(ArithmeticException.class, () -> DoubleMath.roundToBigInteger(d, UNNECESSARY)); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27.3K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java
tmp += DoubleMath.roundToLong(doubleInLongRange[j], mode); } return tmp; } @Benchmark int roundToBigInteger(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += DoubleMath.roundToBigInteger(positiveDoubles[j], mode).intValue(); } return tmp; } @Benchmark int log2Round(int reps) { int tmp = 0;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.7K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java
tmp += DoubleMath.roundToLong(doubleInLongRange[j], mode); } return tmp; } @Benchmark int roundToBigInteger(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += DoubleMath.roundToBigInteger(positiveDoubles[j], mode).intValue(); } return tmp; } @Benchmark int log2Round(int reps) { int tmp = 0;
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 2.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/BigIntegerMathTest.java
BigInteger maxDoubleAsBigInteger = DoubleMath.roundToBigInteger(Double.MAX_VALUE, UNNECESSARY); new RoundToDoubleTester(maxDoubleAsBigInteger) .setExpectation(Double.MAX_VALUE, values()) .test(); } @J2ktIncompatible @GwtIncompatible public void testRoundToDouble_maxDoublePlusOne() { BigInteger maxDoubleAsBigInteger = DoubleMath.roundToBigInteger(Double.MAX_VALUE, UNNECESSARY).add(BigInteger.ONE);
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 27K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
} while (sqrt1.compareTo(sqrt0) < 0); return sqrt0; } @GwtIncompatible // TODO private static BigInteger sqrtApproxWithDoubles(BigInteger x) { return DoubleMath.roundToBigInteger(Math.sqrt(DoubleUtils.bigToDouble(x)), HALF_EVEN); } /** * Returns {@code x}, rounded to a {@code double} with the specified rounding mode. If {@code x}
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 18.8K bytes - Viewed (0)