- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for HALF_EVEN (0.2 sec)
-
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
public void testRoundToDouble_oneThird() { new RoundToDoubleTester( BigDecimal.ONE.divide(BigDecimal.valueOf(3), new MathContext(50, HALF_EVEN))) .roundUnnecessaryShouldThrow() .setExpectation(0.33333333333333337, UP, CEILING) .setExpectation(0.3333333333333333, HALF_EVEN, FLOOR, DOWN, HALF_UP, HALF_DOWN) .test(); } public void testRoundToDouble_halfMinDouble() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 10.6K bytes - Viewed (0) -
android/guava/src/com/google/common/math/ToDoubleRounder.java
checkNotNull(x, "x"); checkNotNull(mode, "mode"); double roundArbitrarily = roundToDoubleArbitrarily(x); if (Double.isInfinite(roundArbitrarily)) { switch (mode) { case DOWN: case HALF_EVEN: case HALF_DOWN: case HALF_UP: return Double.MAX_VALUE * sign(x); case FLOOR: return (roundArbitrarily == Double.POSITIVE_INFINITY) ? Double.MAX_VALUE
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/ToDoubleRounder.java
checkNotNull(x, "x"); checkNotNull(mode, "mode"); double roundArbitrarily = roundToDoubleArbitrarily(x); if (Double.isInfinite(roundArbitrarily)) { switch (mode) { case DOWN: case HALF_EVEN: case HALF_DOWN: case HALF_UP: return Double.MAX_VALUE * sign(x); case FLOOR: return (roundArbitrarily == Double.POSITIVE_INFINITY) ? Double.MAX_VALUE
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/BigDecimalMath.java
* infinite {@code double} values are considered infinitely far away. For example, 2^2000 is not * representable as a double, but {@code roundToDouble(BigDecimal.valueOf(2).pow(2000), HALF_UP)} * will return {@code Double.MAX_VALUE}, not {@code Double.POSITIVE_INFINITY}. * * <p>For the case of {@link RoundingMode#HALF_EVEN}, this implementation uses the IEEE 754
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 3.1K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java
private static final double[] doubleInLongRange = new double[ARRAY_SIZE]; private static final double[] positiveDoubles = new double[ARRAY_SIZE]; @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"}) RoundingMode mode; @BeforeExperiment void setUp() { for (int i = 0; i < ARRAY_SIZE; i++) { doubleInIntRange[i] = randomDouble(Integer.SIZE - 2);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0) -
guava/src/com/google/common/math/BigIntegerMath.java
* infinite {@code double} values are considered infinitely far away. For example, 2^2000 is not * representable as a double, but {@code roundToDouble(BigInteger.valueOf(2).pow(2000), HALF_UP)} * will return {@code Double.MAX_VALUE}, not {@code Double.POSITIVE_INFINITY}. * * <p>For the case of {@link RoundingMode#HALF_EVEN}, this implementation uses the IEEE 754
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/BigDecimalMath.java
* infinite {@code double} values are considered infinitely far away. For example, 2^2000 is not * representable as a double, but {@code roundToDouble(BigDecimal.valueOf(2).pow(2000), HALF_UP)} * will return {@code Double.MAX_VALUE}, not {@code Double.POSITIVE_INFINITY}. * * <p>For the case of {@link RoundingMode#HALF_EVEN}, this implementation uses the IEEE 754
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Feb 23 18:45:50 UTC 2023 - 3.1K bytes - Viewed (0) -
android/guava/src/com/google/common/math/LongMath.java
import static com.google.common.math.MathPreconditions.checkRoundingUnnecessary; import static java.lang.Math.abs; import static java.lang.Math.min; import static java.math.RoundingMode.HALF_EVEN; import static java.math.RoundingMode.HALF_UP; import com.google.common.annotations.GwtCompatible; import com.google.common.annotations.GwtIncompatible; import com.google.common.annotations.VisibleForTesting;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 09 16:39:37 UTC 2024 - 45.2K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/math/DoubleMathRoundingBenchmark.java
private static final double[] doubleInLongRange = new double[ARRAY_SIZE]; private static final double[] positiveDoubles = new double[ARRAY_SIZE]; @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"}) RoundingMode mode; @BeforeExperiment void setUp() { for (int i = 0; i < ARRAY_SIZE; i++) { doubleInIntRange[i] = randomDouble(Integer.SIZE - 2);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/math/MathTesting.java
import static java.math.RoundingMode.CEILING; import static java.math.RoundingMode.DOWN; import static java.math.RoundingMode.FLOOR; import static java.math.RoundingMode.HALF_DOWN; import static java.math.RoundingMode.HALF_EVEN; import static java.math.RoundingMode.HALF_UP; import static java.math.RoundingMode.UP; import static java.util.Arrays.asList; import com.google.common.annotations.GwtCompatible; import com.google.common.base.Function;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 11.2K bytes - Viewed (0)