Home
last modified time | relevance | path

Searched refs:precision (Results 1 – 25 of 49) sorted by relevance

12

/libcore/luni/src/main/java/java/math/
DMathContext.java63 private final int precision; field in MathContext
82 public MathContext(int precision) { in MathContext() argument
83 this(precision, RoundingMode.HALF_UP); in MathContext()
101 public MathContext(int precision, RoundingMode roundingMode) { in MathContext() argument
102 this.precision = precision; in MathContext()
128 this.precision = Integer.parseInt(precisionString); in MathContext()
148 if (precision < 0) { in checkValid()
149 throw new IllegalArgumentException("Negative precision: " + precision); in checkValid()
166 return precision; in getPrecision()
201 && (((MathContext) x).getPrecision() == precision) && (((MathContext) x) in equals()
[all …]
DBigDecimal.java235 private transient int precision = 0; field in BigDecimal
477 precision = 1; in BigDecimal()
1421 int diffPrecision = this.precision() - divisor.precision(); in divideToIntegralValue()
1458 compRemDiv = (new BigDecimal(quotAndRem[1])).precision() in divideToIntegralValue()
1459 + exp - divisor.precision(); in divideToIntegralValue()
1477 long resultPrecision = integralValue.precision(); in divideToIntegralValue()
1791 public int precision() { in precision() method in BigDecimal
1793 if (precision != 0) { in precision()
1794 return precision; in precision()
1798 precision = 1; in precision()
[all …]
/libcore/ojluni/src/main/java/sun/misc/
DFormattedFloatingDecimal.java35 public static FormattedFloatingDecimal valueOf(double d, int precision, Form form){ in valueOf() argument
38 return new FormattedFloatingDecimal(precision,form, fdConverter); in valueOf()
57 …private FormattedFloatingDecimal(int precision, Form form, FloatingDecimal.BinaryToASCIIConverter … in FormattedFloatingDecimal() argument
72 fillCompatible(precision, digits, nDigits, exp, isNegative); in FormattedFloatingDecimal()
75 exp = applyPrecision(decExp, digits, nDigits, decExp + precision); in FormattedFloatingDecimal()
76 fillDecimal(precision, digits, nDigits, exp, isNegative); in FormattedFloatingDecimal()
80 exp = applyPrecision(decExp, digits, nDigits, precision + 1); in FormattedFloatingDecimal()
81 fillScientific(precision, digits, nDigits, exp, isNegative); in FormattedFloatingDecimal()
85 exp = applyPrecision(decExp, digits, nDigits, precision); in FormattedFloatingDecimal()
88 if (exp - 1 < -4 || exp - 1 >= precision) { in FormattedFloatingDecimal()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DIllegalFormatPrecisionExceptionTest.java42 int precision = 12345; in test_getPrecision() local
44 precision); in test_getPrecision()
45 assertEquals(precision, illegalFormatPrecisionException.getPrecision()); in test_getPrecision()
52 int precision = 12345; in test_getMessage() local
54 precision); in test_getMessage()
/libcore/ojluni/annotations/hiddenapi/sun/misc/
DFormattedFloatingDecimal.java32 int precision, in FormattedFloatingDecimal() argument
39 double d, int precision, sun.misc.FormattedFloatingDecimal.Form form) { in valueOf() argument
64 int precision, char[] digits, int nDigits, int exp, boolean isNegative) { in fillCompatible() argument
73 int precision, char[] digits, int nDigits, int exp, boolean isNegative) { in fillDecimal() argument
78 int precision, char[] digits, int nDigits, int exp, boolean isNegative) { in fillScientific() argument
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigDecimalConstructorsTest.java101 int precision = 46; in testConstrBigIntegerMathContext() local
103 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerMathContext()
118 int precision = 46; in testConstrBigIntegerScaleMathContext() local
120 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerScaleMathContext()
175 int precision = 4; in testConstrCharIntIntMathContext() local
177 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContext()
199 int precision = 4; in testConstrCharIntIntMathContextException1() local
201 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContextException1()
216 int precision = 4; in testConstrCharIntIntMathContextException2() local
218 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContextException2()
[all …]
DBigDecimalCompareTest.java62 int precision = 15; in testAbsMathContextNeg() local
64 MathContext mc = new MathContext(precision, rm); in testAbsMathContextNeg()
78 int precision = 41; in testAbsMathContextPos() local
80 MathContext mc = new MathContext(precision, rm); in testAbsMathContextPos()
373 int precision = 37; in testPlusMathContextPositive() local
375 MathContext mc = new MathContext(precision, rm); in testPlusMathContextPositive()
403 int precision = 46; in testPlusMathContextNegative() local
405 MathContext mc = new MathContext(precision, rm); in testPlusMathContextNegative()
433 int precision = 37; in testNegateMathContextPositive() local
435 MathContext mc = new MathContext(precision, rm); in testNegateMathContextPositive()
[all …]
DBigDecimalArithmeticTest.java1158 int precision = 21; in testDivideBigDecimalScaleMathContextUP() local
1160 MathContext mc = new MathContext(precision, rm); in testDivideBigDecimalScaleMathContextUP()
1178 int precision = 21; in testDivideBigDecimalScaleMathContextDOWN() local
1180 MathContext mc = new MathContext(precision, rm); in testDivideBigDecimalScaleMathContextDOWN()
1198 int precision = 21; in testDivideBigDecimalScaleMathContextCEILING() local
1200 MathContext mc = new MathContext(precision, rm); in testDivideBigDecimalScaleMathContextCEILING()
1218 int precision = 21; in testDivideBigDecimalScaleMathContextFLOOR() local
1220 MathContext mc = new MathContext(precision, rm); in testDivideBigDecimalScaleMathContextFLOOR()
1238 int precision = 21; in testDivideBigDecimalScaleMathContextHALF_UP() local
1240 MathContext mc = new MathContext(precision, rm); in testDivideBigDecimalScaleMathContextHALF_UP()
[all …]
/libcore/ojluni/src/main/java/java/util/
DFormatter.java2578 private String precision; field in Formatter.FormatSpecifierParser
2616 precision = nextInt(); in FormatSpecifierParser()
2625 fs = new FormatSpecifier(index, flags, width, precision, tT, conv); in FormatSpecifierParser()
2706 private int precision; field in Formatter.FormatSpecifier
2758 private int precision(String s) { in precision() method in Formatter.FormatSpecifier
2759 precision = -1; in precision()
2764 precision = Integer.parseInt(s); in precision()
2765 if (precision < 0) in precision()
2766 throw new IllegalFormatPrecisionException(precision); in precision()
2771 return precision; in precision()
[all …]
DFormattable.java163 void formatTo(Formatter formatter, int flags, int width, int precision); in formatTo() argument
/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalConstructorsTest.java37 int precision = 46; in testConstrBigIntegerMathContext() local
39 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerMathContext()
118 int precision = 46; in testConstrBigIntegerScaleMathContext() local
120 MathContext mc = new MathContext(precision, rm); in testConstrBigIntegerScaleMathContext()
281 int precision = 4; in testConstrCharIntIntMathContext() local
283 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContext()
374 int precision = 4; in testConstrCharIntIntMathContextException1() local
376 MathContext mc = new MathContext(precision, rm); in testConstrCharIntIntMathContextException1()
434 int precision = 21; in testConstrDoubleMathContext() local
436 MathContext mc = new MathContext(precision, rm); in testConstrDoubleMathContext()
[all …]
DOldBigDecimalScaleOperationsTest.java89 x1.precision(); in testSetScale()
94 x2.precision(); in testSetScale()
DBigDecimalTest.java60 expectedPrecision, parsed.precision()); in assertPrecision()
64 expectedPrecision, computed.precision()); in assertPrecision()
81 assertEquals(20, a.precision()); in testPrecisionFromString()
82 assertEquals(20, b.precision()); in testPrecisionFromString()
DOldBigDecimalArithmeticTest.java50 assertEquals("Incorrect precision!", 33, res.precision()); in testAddMathContextNonTrivial()
65 assertEquals("Incorrect precision!", 17, res.precision()); in testSubtractMathContextNonTrivial()
73 assertEquals("Incorrect precision!", 33, res.precision()); in testSubtractMathContextNonTrivial()
90 assertEquals("Incorrect precision!", 17, res.precision()); in testMultiplyMathContextNonTrivial()
/libcore/ojluni/src/main/java/sun/security/util/
DDerInputBuffer.java364 int precision = 0; in getTime() local
370 precision++; in getTime()
372 switch (precision) { in getTime()
389 len -= precision; in getTime()
/libcore/luni/src/test/java/libcore/java/util/
DOldFormatterTest.java32 …public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalForma… in test_Formattable()
41 …public void formatTo(Formatter formatter, int flags, int width, int precision) throws IllegalForma… in test_Formattable()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporalAccessor.java311 || query == TemporalQueries.precision()) { in query()
DTemporalQueries.java243 public static TemporalQuery<TemporalUnit> precision() { in precision() method in TemporalQueries
/libcore/ojluni/src/main/java/javax/sql/
DRowSetMetaData.java183 void setPrecision(int columnIndex, int precision) throws SQLException; in setPrecision() argument
/libcore/ojluni/src/main/java/java/time/chrono/
DEra.java269 if (query == TemporalQueries.precision()) { in query()
DChronoLocalDate.java514 } else if (query == TemporalQueries.precision()) { in query()
DChronoLocalDateTime.java343 } else if (query == TemporalQueries.precision()) { in query()
/libcore/ojluni/src/main/java/java/time/
DDayOfWeek.java407 if (query == TemporalQueries.precision()) { in query()
DMonth.java566 } else if (query == TemporalQueries.precision()) { in query()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimePrintContext.java216 if (query == TemporalQueries.precision()) { in adjust()

12