/libcore/ojluni/src/main/java/jdk/internal/math/ |
D | FormattedFloatingDecimal.java | 35 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/ojluni/src/main/java/java/math/ |
D | MathContext.java | 120 final int precision; field in MathContext 163 precision = setPrecision; in MathContext() 206 precision = setPrecision; in MathContext() 217 return precision; in getPrecision() 253 return mc.precision == this.precision in equals() 263 return this.precision + roundingMode.hashCode() * 59; in hashCode() 299 return "precision=" + precision + " " + in toString() 318 if (precision < MIN_DIGITS) { in readObject()
|
D | BigDecimal.java | 334 private transient int precision; field in BigDecimal 455 this.precision = prec; in BigDecimal() 607 int mcp = mc.precision; in BigDecimal() 672 int mcp = mc.precision; in BigDecimal() 706 this.precision = prec; in BigDecimal() 1014 this.precision = 1; in BigDecimal() 1038 int mcp = mc.precision; in BigDecimal() 1071 this.precision = prec; in BigDecimal() 1142 int mcp = mc.precision; in BigDecimal() 1175 this.precision = prec; in BigDecimal() [all …]
|
/libcore/ojluni/src/test/java/math/BigDecimal/ |
D | AddTests.java | 196 b1.precision(); in roundAway() 197 b2.precision(); in roundAway() 202 b1_negate.precision(); in roundAway() 203 b2_negate.precision(); in roundAway() 223 for(int precision = 1 ; precision < exactSum.precision()+2; precision++) { in roundAway0() 225 MathContext mc = new MathContext(precision, rm); in roundAway0() 251 a.precision(); in precisionConsistencyTest()
|
D | SquareRootTests.java | 133 for (int precision = 1; i < 20; i++) { in twoDigitTests() 135 MathContext mc = new MathContext(precision, rm); in twoDigitTests() 173 if (result.precision() > 1) { in evenPowersOfTenTests() 200 for (int precision = 1; precision < 63; precision++) { in squareRootTwoTests() 201 MathContext mc = new MathContext(precision, mode); in squareRootTwoTests() 233 for (int precision = 0; precision <= 5; precision++) { in lowPrecisionPerfectSquares() 235 MathContext mc = new MathContext(precision, rm); in lowPrecisionPerfectSquares() 241 if (precision >= expectedScale + 1 && computedScale != expectedScale) { in lowPrecisionPerfectSquares() 243 computedRoot, precision, rm) + in lowPrecisionPerfectSquares() 365 int precision = halfWayCase.precision() - 1; [all …]
|
D | PrecisionTests.java | 82 int precision = bd.precision(); in testPrecision() local 84 Assert.assertEquals(precision, expected, in testPrecision() 85 String.format("For (%s).precision expected %d, got %d%n", bd, expected, precision)); in testPrecision()
|
D | StringConstructor.java | 112 Assert.assertFalse(! expected.equals(tmp) || tmp.precision() != 1, in nonAsciiZeroTest() 114 tmp + "precision = " + tmp.precision()); in nonAsciiZeroTest()
|
D | IntegralDivisionTests.java | 235 for(int precision: precisions) { in dividetoIntegralValueScalingTests() 236 divideContextTests(dividend, divisor, expected, new MathContext(precision, rm)); in dividetoIntegralValueScalingTests()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | IllegalFormatPrecisionExceptionTest.java | 42 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/ |
D | FormattedFloatingDecimal.java | 32 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/ |
D | BigDecimalConstructorsTest.java | 101 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 …]
|
D | BigDecimalCompareTest.java | 62 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 …]
|
D | BigDecimalArithmeticTest.java | 1158 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/ |
D | Formatter.java | 2731 private String precision; field in Formatter.FormatSpecifierParser 2769 precision = nextInt(); in FormatSpecifierParser() 2778 fs = new FormatSpecifier(index, flags, width, precision, tT, conv); in FormatSpecifierParser() 2865 private int precision; field in Formatter.FormatSpecifier 2922 private int precision(String s) { in precision() method in Formatter.FormatSpecifier 2923 precision = -1; in precision() 2930 precision = Integer.parseInt(s); in precision() 2931 if (precision < 0) in precision() 2932 throw new IllegalFormatPrecisionException(precision); in precision() 2937 return precision; in precision() [all …]
|
D | Formattable.java | 163 void formatTo(Formatter formatter, int flags, int width, int precision); in formatTo() argument
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalConstructorsTest.java | 37 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 …]
|
D | OldBigDecimalScaleOperationsTest.java | 89 x1.precision(); in testSetScale() 94 x2.precision(); in testSetScale()
|
D | BigDecimalTest.java | 60 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()
|
/libcore/ojluni/src/main/java/sun/security/util/ |
D | DerInputBuffer.java | 364 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/ |
D | OldFormatterTest.java | 32 …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/ |
D | TemporalAccessor.java | 311 || query == TemporalQueries.precision()) { in query()
|
D | TemporalQueries.java | 243 public static TemporalQuery<TemporalUnit> precision() { in precision() method in TemporalQueries
|
/libcore/ojluni/src/main/java/javax/sql/ |
D | RowSetMetaData.java | 183 void setPrecision(int columnIndex, int precision) throws SQLException; in setPrecision() argument
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | Era.java | 269 if (query == TemporalQueries.precision()) { in query()
|
/libcore/ojluni/src/main/java/java/time/ |
D | DayOfWeek.java | 407 if (query == TemporalQueries.precision()) { in query()
|