Home
last modified time | relevance | path

Searched refs:HALF_UP (Results 1 – 25 of 36) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/math/
DBigDecimalMathTest.java24 import static java.math.RoundingMode.HALF_UP;
98 .setExpectation(0.3333333333333333, HALF_EVEN, FLOOR, DOWN, HALF_UP, HALF_DOWN) in testRoundToDouble_oneThird()
107 .setExpectation(Double.MIN_VALUE, UP, CEILING, HALF_UP) in testRoundToDouble_halfMinDouble()
117 .setExpectation(-Double.MIN_VALUE, UP, FLOOR, HALF_UP) in testRoundToDouble_halfNegativeMinDouble()
138 .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP) in testRoundToDouble_maxPreciselyRepresentablePlusOne()
148 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusOne()
159 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusOneHalf()
171 .setExpectation(Math.nextUp(twoToThe54), CEILING, UP, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusThree() local
190 .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN) in testRoundToDouble_maxDoublePlusOne()
199 .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN) in testRoundToDouble_wayTooBig()
[all …]
DBigIntegerMathTest.java35 import static java.math.RoundingMode.HALF_UP;
185 int result = BigIntegerMath.log2(x, HALF_UP); in testLog2HalfUp()
212 assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog2HalfEven()
278 int result = BigIntegerMath.log10(x, HALF_UP); in testLog10HalfUp()
307 assertEquals(BigIntegerMath.log10(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog10HalfEven()
380 BigInteger result = BigIntegerMath.sqrt(x, HALF_UP);
417 assertEquals(BigIntegerMath.sqrt(x, floorWasOdd ? HALF_UP : HALF_DOWN), halfEven);
625 .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
636 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN)
649 .setExpectation(Math.nextUp(twoToThe54), CEILING, UP, HALF_DOWN, HALF_UP, HALF_EVEN)
[all …]
DMathTesting.java26 import static java.math.RoundingMode.HALF_UP;
51 ImmutableList.of(DOWN, UP, FLOOR, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN);
/external/guava/android/guava-tests/test/com/google/common/math/
DBigDecimalMathTest.java24 import static java.math.RoundingMode.HALF_UP;
98 .setExpectation(0.3333333333333333, HALF_EVEN, FLOOR, DOWN, HALF_UP, HALF_DOWN) in testRoundToDouble_oneThird()
107 .setExpectation(Double.MIN_VALUE, UP, CEILING, HALF_UP) in testRoundToDouble_halfMinDouble()
117 .setExpectation(-Double.MIN_VALUE, UP, FLOOR, HALF_UP) in testRoundToDouble_halfNegativeMinDouble()
138 .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP) in testRoundToDouble_maxPreciselyRepresentablePlusOne()
148 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusOne()
159 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusOneHalf()
171 .setExpectation(Math.nextUp(twoToThe54), CEILING, UP, HALF_DOWN, HALF_UP, HALF_EVEN) in testRoundToDouble_twoToThe54PlusThree() local
190 .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN) in testRoundToDouble_maxDoublePlusOne()
199 .setExpectation(Double.MAX_VALUE, DOWN, FLOOR, HALF_EVEN, HALF_UP, HALF_DOWN) in testRoundToDouble_wayTooBig()
[all …]
DBigIntegerMathTest.java35 import static java.math.RoundingMode.HALF_UP;
185 int result = BigIntegerMath.log2(x, HALF_UP); in testLog2HalfUp()
212 assertEquals(BigIntegerMath.log2(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog2HalfEven()
278 int result = BigIntegerMath.log10(x, HALF_UP); in testLog10HalfUp()
307 assertEquals(BigIntegerMath.log10(x, floorWasEven ? HALF_DOWN : HALF_UP), halfEven); in testLog10HalfEven()
380 BigInteger result = BigIntegerMath.sqrt(x, HALF_UP);
417 assertEquals(BigIntegerMath.sqrt(x, floorWasOdd ? HALF_UP : HALF_DOWN), halfEven);
625 .setExpectation(Math.nextUp(twoToThe53), CEILING, UP, HALF_UP)
636 .setExpectation(twoToThe54, DOWN, FLOOR, HALF_DOWN, HALF_UP, HALF_EVEN)
649 .setExpectation(Math.nextUp(twoToThe54), CEILING, UP, HALF_DOWN, HALF_UP, HALF_EVEN)
[all …]
DMathTesting.java26 import static java.math.RoundingMode.HALF_UP;
51 ImmutableList.of(DOWN, UP, FLOOR, CEILING, HALF_EVEN, HALF_UP, HALF_DOWN);
/external/guava/android/guava/src/com/google/common/math/
DIntMath.java26 import static java.math.RoundingMode.HALF_UP;
133 case HALF_UP: in log2()
174 case HALF_UP: in log10()
282 case HALF_UP: in sqrt()
355 case HALF_UP: in divide()
361 increment = (mode == HALF_UP || (mode == HALF_EVEN & (div & 1) != 0)); in divide()
DToDoubleRounder.java54 case HALF_UP: in roundToDouble()
99 case HALF_UP: in roundToDouble()
143 case HALF_UP: in roundToDouble()
DLongMath.java26 import static java.math.RoundingMode.HALF_UP;
136 case HALF_UP: in log2()
178 case HALF_UP: in log10()
355 case HALF_UP: in sqrt()
421 case HALF_UP: in divide()
427 increment = (mode == HALF_UP | (mode == HALF_EVEN & (div & 1) != 0)); in divide()
1295 case HALF_UP: in roundToDouble()
1338 case HALF_UP: in roundToDouble()
DBigIntegerMath.java106 case HALF_UP: in log2()
205 case HALF_UP: in log10()
248 case HALF_UP: in sqrt()
DDoubleMath.java91 case HALF_UP: in roundIntermediate()
265 case HALF_UP: in log2()
/external/guava/guava/src/com/google/common/math/
DIntMath.java26 import static java.math.RoundingMode.HALF_UP;
133 case HALF_UP: in log2()
174 case HALF_UP: in log10()
282 case HALF_UP: in sqrt()
355 case HALF_UP: in divide()
361 increment = (mode == HALF_UP || (mode == HALF_EVEN & (div & 1) != 0)); in divide()
DToDoubleRounder.java54 case HALF_UP: in roundToDouble()
99 case HALF_UP: in roundToDouble()
143 case HALF_UP: in roundToDouble()
DLongMath.java26 import static java.math.RoundingMode.HALF_UP;
136 case HALF_UP: in log2()
178 case HALF_UP: in log10()
355 case HALF_UP: in sqrt()
421 case HALF_UP: in divide()
427 increment = (mode == HALF_UP | (mode == HALF_EVEN & (div & 1) != 0)); in divide()
1295 case HALF_UP: in roundToDouble()
1338 case HALF_UP: in roundToDouble()
DBigIntegerMath.java106 case HALF_UP: in log2()
205 case HALF_UP: in log10()
248 case HALF_UP: in sqrt()
DDoubleMath.java91 case HALF_UP: in roundIntermediate()
265 case HALF_UP: in log2()
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v1/
DQuantizeAndDequantizeV2.pbtxt214 s: "HALF_UP"
279 s: "HALF_UP"
351 s: "HALF_UP"
/external/tensorflow/tensorflow/core/ops/compat/ops_history_v2/
DQuantizeAndDequantizeV2.pbtxt214 s: "HALF_UP"
279 s: "HALF_UP"
DQuantizeAndDequantizeV4.pbtxt61 s: "HALF_UP"
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/
DNumberFormatICU.java129 mode = RoundingMode.HALF_UP; in getRoundingMode()
219 } else if (roundingMode.equals(RoundingMode.HALF_UP)) { in setRoundingMode()
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/icuadapter/
DNumberFormatJDK.java163 } else if (jdkMode.equals(RoundingMode.HALF_UP)) { in getRoundingMode()
271 mode = RoundingMode.HALF_UP; in setRoundingMode()
/external/caliper/caliper/src/main/java/com/google/caliper/util/
DShortDuration.java61 return ofPicos(toLong(picos, RoundingMode.HALF_UP)); in of()
107 return to(unit, RoundingMode.HALF_UP); in to()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/number/
DDecimalQuantityTest.java190 …private static final MathContext MATH_CONTEXT_PRECISION = new MathContext(3, RoundingMode.HALF_UP);
548 {1.025, -2, RoundingMode.HALF_UP, "1.05"}, in testNickelRounding()
557 {1.075, -2, RoundingMode.HALF_UP, "1.1"}, in testNickelRounding()
565 {2.25, -1, RoundingMode.HALF_UP, "2.5"}, in testNickelRounding()
/external/apache-commons-math/src/main/java/org/apache/commons/math/util/
DBigReal.java53 private RoundingMode roundingMode = RoundingMode.HALF_UP;
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/
DDecimalQuantityTest.java187 …private static final MathContext MATH_CONTEXT_PRECISION = new MathContext(3, RoundingMode.HALF_UP);
545 {1.025, -2, RoundingMode.HALF_UP, "1.05"}, in testNickelRounding()
554 {1.075, -2, RoundingMode.HALF_UP, "1.1"}, in testNickelRounding()
562 {2.25, -1, RoundingMode.HALF_UP, "2.5"}, in testNickelRounding()

12