Lines Matching defs:precision

90  *   // locale-specific formatting of numbers.  The precision and width can be
176 * %[argument_index$][flags][width][.precision]conversion
189 * <p> The optional <i>precision</i> is a non-negative decimal integer usually
335 * decimal format, depending on the precision and the value after rounding.
617 * <p> For general argument types, the precision is the maximum number of
621 * {@code 'f'} the precision is the number of digits after the decimal
623 * precision is the total number of digits in the resulting magnitude after
625 * precision must not be specified.
628 * and line separator conversions, the precision is not applicable; if a
629 * precision is provided, an exception will be thrown.
663 * <p> If the format specifier contains a width or precision with an invalid
775 * <p> The precision is the maximum number of characters to be written to the
776 * output. The precision is applied before the width, thus the output will be
777 * truncated to {@code precision} characters even if the width is greater than
778 * the precision. If the precision is not specified then there is no explicit
814 * <p> The precision is not applicable. If the precision is specified then an
1041 * <p> The precision is not applicable. If precision is specified then an
1135 * <p> The precision is not applicable. If precision is specified then an
1179 * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not
1180 * specified then the default value is {@code 6}. If the precision is less
1185 * algorithm}. Otherwise, zeros may be appended to reach the precision.
1204 * <p> After rounding for the precision, the formatting of the resulting
1208 * than 10<sup>precision</sup> then it is represented in <i><a
1212 * 10<sup>precision</sup>, then it is represented in <i><a
1216 * precision. If the precision is not specified, then the default value is
1217 * {@code 6}. If the precision is {@code 0}, then it is taken to be
1248 * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not
1249 * specified then the default value is {@code 6}. If the precision is less
1254 * algorithm}. Otherwise, zeros may be appended to reach the precision.
1350 * {@code 'E'} or {@code 'f'}, then the precision is the number of digits
1351 * after the decimal separator. If the precision is not specified, then it is
1354 * <p> If the conversion is {@code 'g'} or {@code 'G'}, then the precision is
1356 * rounding. If the precision is not specified, then the default value is
1357 * {@code 6}. If the precision is {@code 0}, then it is taken to be
1360 * <p> If the conversion is {@code 'a'} or {@code 'A'}, then the precision
1362 * precision is not provided, then all of the digits as returned by {@link
1402 * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not
1403 * specified then the default value is {@code 6}. If the precision is
1407 * algorithm}. Otherwise, zeros may be appended to reach the precision.
1425 * <p> After rounding for the precision, the formatting of the resulting
1429 * than 10<sup>precision</sup> then it is represented in <i><a
1433 * 10<sup>precision</sup>, then it is represented in <i><a
1437 * precision. If the precision is not specified, then the default value is
1438 * {@code 6}. If the precision is {@code 0}, then it is taken to be
1465 * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not
1466 * specified then the default value is {@code 6}. If the precision is
1470 * algorithm}. Otherwise, zeros may be appended to reach the precision.
1486 * href="#floatDPrec">precision</a> is the same as defined for Float and
1557 * zeros as necessary, i.e. {@code 000000000 - 999999999}. The precision
1599 * {@code Long.MAX_VALUE}. The precision of this value is limited by
1723 * <p> The precision is not applicable. If the precision is specified then an
1746 * <p> The precision is not applicable. If the precision is specified an
1763 * <p> Flags, width, and precision are not applicable. If any are provided an
2504 // %[argument_index$][flags][width][.precision][t]conversion
2573 private int precision;
2623 private int precision(String s) {
2624 precision = -1;
2628 precision = Integer.parseInt(s.substring(1));
2629 if (precision < 0)
2630 throw new IllegalFormatPrecisionException(precision);
2635 return precision;
2638 int precision() {
2639 return precision;
2666 precision(m.group(idx++));
2831 ((Formattable)arg).formatTo(fmt, f.valueOf(), width, precision);
2861 if (precision != -1 && precision < s.length())
2862 s = s.substring(0, precision);
2891 if (precision != -1)
2892 sb.append('.').append(precision);
2912 if (precision != -1)
2913 throw new IllegalFormatPrecisionException(precision);
2924 if (precision != -1)
2925 throw new IllegalFormatPrecisionException(precision);
2935 if (precision != -1)
2936 throw new IllegalFormatPrecisionException(precision);
2968 if (precision != -1 && precision < 0)
2969 throw new IllegalFormatPrecisionException(precision);
2983 if (precision != -1)
2984 throw new IllegalFormatPrecisionException(precision);
3190 print(sb, v, l, f, c, precision, neg);
3207 Flags f, char c, int precision, boolean neg)
3212 // precision.
3213 int prec = (precision == -1 ? 6 : precision);
3224 // If the precision is zero and the '#' flag is set, add the
3249 // precision.
3250 int prec = (precision == -1 ? 6 : precision);
3263 // If the precision is zero and the '#' flag is set, add the
3273 int prec = precision;
3274 if (precision == -1)
3276 else if (precision == 0)
3296 // If the precision is zero and the '#' flag is set, add the
3323 int prec = precision;
3324 if (precision == -1)
3327 else if (precision == 0)
3378 // Add zeros to the requested precision.
3392 // Determine existing precision.
3442 int precision = 1 + prec*4;
3444 = DoubleConsts.SIGNIFICAND_WIDTH - precision;
3510 print(sb, v, l, f, c, precision, neg);
3521 Flags f, char c, int precision, boolean neg)
3525 // Create a new BigDecimal with the desired precision.
3526 int prec = (precision == -1 ? 6 : precision);
3528 int origPrec = value.precision();
3552 // precision is one. Append a decimal point if '#' is set or if
3553 // we require zero padding to get to the requested precision.
3558 // Add trailing zeros in the case precision is greater than
3579 // Create a new BigDecimal with the desired precision.
3580 int prec = (precision == -1 ? 6 : precision);
3584 // more "scale" digits than the requested "precision"
3585 int compPrec = value.precision();
3608 // requested precision.
3612 // Add trailing zeros if the precision is greater than the
3618 int prec = precision;
3619 if (precision == -1)
3621 else if (precision == 0)
3634 // g precision (# sig digits) = #x + #y
3635 // f precision = #y
3637 // => f precision = g precision - exponent - 1
3639 // g precision (# sig digits) = #z
3640 // f precision = #0 (after '.') + #z
3642 // => f precision = g precision - exponent - 1
3801 // Add trailing zeros in the case precision is greater than the number