- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for HALF_DOWN (0.06 sec)
-
android/guava-tests/test/com/google/common/math/BigDecimalMathTest.java
double twoToThe53 = Math.pow(2, 53); // the representable doubles are 2^53 and 2^53 + 2. // 2^53+1 is halfway between, so HALF_UP will go up and HALF_DOWN will go down. new RoundToDoubleTester(BigDecimal.valueOf((1L << 53) + 1)) .setExpectation(twoToThe53, DOWN, FLOOR, HALF_DOWN, HALF_EVEN) .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP) .roundUnnecessaryShouldThrow() .test(); }
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(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(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) -
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-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.BigInteger.ZERO; 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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/math/MathTesting.java
import static java.math.BigInteger.ZERO; 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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 11.2K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
private static final BigInteger[] nonzero2 = new BigInteger[ARRAY_SIZE]; private static final BigInteger[] positive = new BigInteger[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++) { positive[i] = randomPositiveBigInteger(1024); nonzero1[i] = randomNonZeroBigInteger(1024);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 30 13:06:20 UTC 2020 - 2.8K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/math/IntMathRoundingBenchmark.java
nonzero[i] = randomNonZeroBigInteger(Integer.SIZE - 2).intValue(); ints[i] = RANDOM_SOURCE.nextInt(); } } @Param({"DOWN", "UP", "FLOOR", "CEILING", "HALF_EVEN", "HALF_UP", "HALF_DOWN"}) RoundingMode mode; @Benchmark int log2(int reps) { int tmp = 0; for (int i = 0; i < reps; i++) { int j = i & ARRAY_MASK; tmp += IntMath.log2(positive[j], mode); }
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/benchmark/com/google/common/math/BigIntegerMathRoundingBenchmark.java
private static final BigInteger[] nonzero2 = new BigInteger[ARRAY_SIZE]; private static final BigInteger[] positive = new BigInteger[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++) { positive[i] = randomPositiveBigInteger(1024); nonzero1[i] = randomNonZeroBigInteger(1024);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jun 30 13:06:20 UTC 2020 - 2.8K bytes - Viewed (0)