Home
last modified time | relevance | path

Searched refs:RoundingMode (Results 1 – 25 of 33) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/math/
DBigIntegerMathTest.java29 import static java.math.RoundingMode.CEILING;
30 import static java.math.RoundingMode.DOWN;
31 import static java.math.RoundingMode.FLOOR;
32 import static java.math.RoundingMode.HALF_DOWN;
33 import static java.math.RoundingMode.HALF_EVEN;
34 import static java.math.RoundingMode.HALF_UP;
35 import static java.math.RoundingMode.UNNECESSARY;
36 import static java.math.RoundingMode.UP;
45 import java.math.RoundingMode;
68 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog2ZeroAlwaysThrows()
[all …]
DDoubleMathTest.java26 import static java.math.RoundingMode.CEILING;
27 import static java.math.RoundingMode.DOWN;
28 import static java.math.RoundingMode.FLOOR;
29 import static java.math.RoundingMode.HALF_DOWN;
30 import static java.math.RoundingMode.HALF_EVEN;
31 import static java.math.RoundingMode.HALF_UP;
32 import static java.math.RoundingMode.UNNECESSARY;
33 import static java.math.RoundingMode.UP;
42 import java.math.RoundingMode;
74 for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { in testRoundIntegralDoubleToInt()
[all …]
DIntMathTest.java27 import static java.math.RoundingMode.FLOOR;
28 import static java.math.RoundingMode.UNNECESSARY;
38 import java.math.RoundingMode;
99 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog2ZeroAlwaysThrows()
110 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog2NegativeAlwaysThrows()
123 for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { in testLog2MatchesBigInteger()
146 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10ZeroAlwaysThrows()
157 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10NegativeAlwaysThrows()
170 for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { in testLog10MatchesBigInteger()
195 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10TrivialOnPowerOfTen()
[all …]
DMathTesting.java21 import static java.math.RoundingMode.CEILING;
22 import static java.math.RoundingMode.DOWN;
23 import static java.math.RoundingMode.FLOOR;
24 import static java.math.RoundingMode.HALF_DOWN;
25 import static java.math.RoundingMode.HALF_EVEN;
26 import static java.math.RoundingMode.HALF_UP;
27 import static java.math.RoundingMode.UP;
39 import java.math.RoundingMode;
48 static final ImmutableSet<RoundingMode> ALL_ROUNDING_MODES = ImmutableSet.copyOf(RoundingMode
51 static final ImmutableList<RoundingMode> ALL_SAFE_ROUNDING_MODES = ImmutableList.of(DOWN, UP,
DLongMathTest.java30 import static java.math.RoundingMode.FLOOR;
31 import static java.math.RoundingMode.UNNECESSARY;
39 import java.math.RoundingMode;
140 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog2ZeroAlwaysThrows()
150 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog2NegativeAlwaysThrows()
162 for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { in testLog2MatchesBigInteger()
184 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10ZeroAlwaysThrows()
194 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10NegativeAlwaysThrows()
206 for (RoundingMode mode : ALL_SAFE_ROUNDING_MODES) { in testLog10MatchesBigInteger()
228 for (RoundingMode mode : ALL_ROUNDING_MODES) { in testLog10TrivialOnPowerOf10()
[all …]
/external/apache-harmony/math/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalConstructorsTest.java26 import java.math.RoundingMode;
102 RoundingMode rm = RoundingMode.CEILING; in testConstrBigIntegerMathContext()
119 RoundingMode rm = RoundingMode.CEILING; in testConstrBigIntegerScaleMathContext()
176 RoundingMode rm = RoundingMode.CEILING; in testConstrCharIntIntMathContext()
200 RoundingMode rm = RoundingMode.CEILING; in testConstrCharIntIntMathContextException1()
217 RoundingMode rm = RoundingMode.CEILING; in testConstrCharIntIntMathContextException2()
292 RoundingMode rm = RoundingMode.CEILING; in testConstrDoubleMathContext()
355 RoundingMode rm = RoundingMode.CEILING; in testConstrIntMathContext()
382 RoundingMode rm = RoundingMode.CEILING; in testConstrLongMathContext()
676 RoundingMode rm = RoundingMode.CEILING; in testConstrStringMathContext()
DBigDecimalArithmeticTest.java23 import java.math.RoundingMode;
61 MathContext mc = new MathContext(5, RoundingMode.UP); in testAddMathContextEqualScalePosPos()
96 MathContext mc = new MathContext(5, RoundingMode.FLOOR); in testAddMathContextEqualScaleNegNeg()
131 MathContext mc = new MathContext(15, RoundingMode.CEILING); in testAddMathContextDiffScalePosNeg()
200 MathContext mc = new MathContext(15, RoundingMode.CEILING); in testSubtractMathContextEqualScalePosPos()
253 MathContext mc = new MathContext(17, RoundingMode.DOWN); in testSubtractMathContextDiffScalePosNeg()
289 MathContext mc = new MathContext(70, RoundingMode.HALF_DOWN); in testSubtractMathContextDiffScaleNegPos()
324 MathContext mc = new MathContext(40, RoundingMode.HALF_DOWN); in testMultiplyMathContextScalePosPos()
376 MathContext mc = new MathContext(53, RoundingMode.HALF_UP); in testMultiplyMathContextDiffScalePosNeg()
411 MathContext mc = new MathContext(47, RoundingMode.HALF_UP); in testMultiplyMathContextDiffScaleNegPos()
[all …]
DBigDecimalCompareTest.java26 import java.math.RoundingMode;
63 RoundingMode rm = RoundingMode.HALF_DOWN; in testAbsMathContextNeg()
79 RoundingMode rm = RoundingMode.HALF_EVEN; in testAbsMathContextPos()
374 RoundingMode rm = RoundingMode.FLOOR; in testPlusMathContextPositive()
404 RoundingMode rm = RoundingMode.CEILING; in testPlusMathContextNegative()
434 RoundingMode rm = RoundingMode.FLOOR; in testNegateMathContextPositive()
464 RoundingMode rm = RoundingMode.CEILING; in testNegateMathContextNegative()
DBigDecimalScaleOperationsTest.java245 BigDecimal result = aNumber.setScale(newScale, RoundingMode.HALF_EVEN); in testSetScaleIntRoundingMode()
/external/guava/guava/src/com/google/common/math/
DDoubleMath.java33 import java.math.RoundingMode;
50 static double roundIntermediate(double x, RoundingMode mode) { in roundIntermediate()
111 public static int roundToInt(double x, RoundingMode mode) { in roundToInt()
134 public static long roundToLong(double x, RoundingMode mode) { in roundToLong()
158 public static BigInteger roundToBigInteger(double x, RoundingMode mode) { in roundToBigInteger()
211 public static int log2(double x, RoundingMode mode) { in log2()
DIntMath.java26 import static java.math.RoundingMode.HALF_EVEN;
27 import static java.math.RoundingMode.HALF_UP;
35 import java.math.RoundingMode;
76 public static int log2(int x, RoundingMode mode) { in log2()
117 public static int log10(int x, RoundingMode mode) { in log10()
207 public static int sqrt(int x, RoundingMode mode) { in sqrt()
249 public static int divide(int p, int q, RoundingMode mode) { in divide()
DBigIntegerMath.java24 import static java.math.RoundingMode.CEILING;
25 import static java.math.RoundingMode.FLOOR;
26 import static java.math.RoundingMode.HALF_EVEN;
33 import java.math.RoundingMode;
67 public static int log2(BigInteger x, RoundingMode mode) { in log2()
126 public static int log10(BigInteger x, RoundingMode mode) { in log10()
182 public static BigInteger sqrt(BigInteger x, RoundingMode mode) { in sqrt()
266 public static BigInteger divide(BigInteger p, BigInteger q, RoundingMode mode){ in divide()
DLongMath.java27 import static java.math.RoundingMode.HALF_EVEN;
28 import static java.math.RoundingMode.HALF_UP;
34 import java.math.RoundingMode;
72 public static int log2(long x, RoundingMode mode) { in log2()
112 public static int log10(long x, RoundingMode mode) { in log10()
243 public static long sqrt(long x, RoundingMode mode) { in sqrt()
296 public static long divide(long p, long q, RoundingMode mode) { in divide()
/external/apache-harmony/text/src/test/java/org/apache/harmony/text/tests/java/text/
DDecimalFormatTest.java23 import java.math.RoundingMode;
1614 decimalFormat.setRoundingMode(RoundingMode.UNNECESSARY); in test_formatToCharacterIteratorLjava_lang_Object__ArithmeticException()
1633 decimalFormat.setRoundingMode(RoundingMode.UNNECESSARY); in test_formatDLjava_lang_StringBufferLjava_text_FieldPosition_ArithmeticException()
1654 decimalFormat.setRoundingMode(RoundingMode.UNNECESSARY); in test_formatJLjava_lang_StringBufferLjava_text_FieldPosition_ArithmeticException()
1675 …assertEquals("Incorrect default RoundingMode", decimalFormat.getRoundingMode(), RoundingMode.HALF_… in test_GetRoundingMode()
1678 decimalFormat.setRoundingMode(RoundingMode.HALF_DOWN); in test_GetRoundingMode()
1680 .getRoundingMode(), RoundingMode.HALF_DOWN); in test_GetRoundingMode()
1695 decimalFormat.setRoundingMode(RoundingMode.HALF_DOWN); in test_SetRoudingMode_Ljava_math_RoundingMode()
1710 decimalFormat.setRoundingMode(RoundingMode.CEILING); in test_SetRoudingMode_Ljava_math_RoundingMode()
1721 decimalFormat.setRoundingMode(RoundingMode.DOWN); in test_SetRoudingMode_Ljava_math_RoundingMode()
[all …]
DNumberFormatTest.java19 import java.math.RoundingMode;
294 ((NumberFormat) choiceFormat).setRoundingMode(RoundingMode.CEILING); in test_setRoundingMode_Normal()
/external/guava/guava/src/com/google/common/hash/
DBloomFilterStrategies.java9 import java.math.RoundingMode;
65 this(new long[IntMath.divide(bits, 64, RoundingMode.CEILING)]); in BitArray()
/external/webkit/Source/WebCore/platform/graphics/
DGraphicsContext.h385 enum RoundingMode { enum
389 FloatRect roundToDevicePixels(const FloatRect&, RoundingMode = RoundAllSides);
/external/apache-harmony/math/src/test/java/tests/api/java/math/
DBigDecimalTest.java27 import java.math.RoundingMode;
926 RoundingMode rm = RoundingMode.HALF_DOWN; in testMathContextConstruction()
/external/webkit/Source/WebCore/platform/graphics/openvg/
DGraphicsContextOpenVG.cpp260 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect, RoundingMode) in roundToDevicePixels() argument
/external/webkit/Source/WebCore/platform/graphics/android/context/
DGraphicsContextAndroid.cpp535 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect, RoundingMode) in roundToDevicePixels() argument
/external/eigen/unsupported/test/mpreal/
Dmpreal.h475 …inline mpreal& setPrecision(int Precision, mp_rnd_t RoundingMode = (mpfr_get_default_rounding_mod…
482 mpreal& setSign (int Sign, mp_rnd_t RoundingMode = (mpfr_get_default_rounding_mode)());
1442 inline mpreal& mpreal::setSign(int sign, mp_rnd_t RoundingMode)
1444 mpfr_setsign(mp,mp,(sign<0?1:0),RoundingMode);
1454 inline mpreal& mpreal::setPrecision(int Precision, mp_rnd_t RoundingMode)
1456 mpfr_prec_round(mp,Precision, RoundingMode);
/external/v8/src/ia32/
Dassembler-ia32.h997 enum RoundingMode { enum
1004 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode);
/external/webkit/Source/WebCore/platform/graphics/wx/
DGraphicsContextWx.cpp419 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& frect, RoundingMode) in roundToDevicePixels() argument
/external/v8/src/x64/
Dassembler-x64.h1367 enum RoundingMode { enum
1374 void roundsd(XMMRegister dst, XMMRegister src, RoundingMode mode);
/external/webkit/Source/WebCore/platform/graphics/skia/
DGraphicsContextSkia.cpp873 FloatRect GraphicsContext::roundToDevicePixels(const FloatRect& rect, RoundingMode) in roundToDevicePixels() argument

12