< prev index next >

src/java.base/share/classes/java/util/Formatter.java

Print this page

        

*** 1227,1237 **** * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is less * than the number of digits which would appear after the decimal point in * the string returned by {@link Float#toString(float)} or {@link * Double#toString(double)} respectively, then the value will be rounded ! * using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * Float#toString(float)} or {@link Double#toString(double)} as * appropriate. * --- 1227,1237 ---- * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is less * than the number of digits which would appear after the decimal point in * the string returned by {@link Float#toString(float)} or {@link * Double#toString(double)} respectively, then the value will be rounded ! * using the {@linkplain java.math.RoundingMode#HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * Float#toString(float)} or {@link Double#toString(double)} as * appropriate. *
*** 1296,1306 **** * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is less * than the number of digits which would appear after the decimal point in * the string returned by {@link Float#toString(float)} or {@link * Double#toString(double)} respectively, then the value will be rounded ! * using the {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * Float#toString(float)} or {@link Double#toString(double)} as * appropriate. * --- 1296,1306 ---- * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is less * than the number of digits which would appear after the decimal point in * the string returned by {@link Float#toString(float)} or {@link * Double#toString(double)} respectively, then the value will be rounded ! * using the {@linkplain java.math.RoundingMode#HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * Float#toString(float)} or {@link Double#toString(double)} as * appropriate. *
*** 1459,1469 **** * <p> The number of digits in the result for the fractional part of * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is * less than the number of digits to the right of the decimal point then * the value will be rounded using the ! * {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * * <p> If the {@code ','} flag is given, then an {@link --- 1459,1469 ---- * <p> The number of digits in the result for the fractional part of * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is * less than the number of digits to the right of the decimal point then * the value will be rounded using the ! * {@linkplain java.math.RoundingMode#HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * * <p> If the {@code ','} flag is given, then an {@link
*** 1522,1532 **** * <p> The number of digits in the result for the fractional part of * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is * less than the number of digits to the right of the decimal point * then the value will be rounded using the ! * {@linkplain java.math.BigDecimal#ROUND_HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * * </tbody> --- 1522,1532 ---- * <p> The number of digits in the result for the fractional part of * <i>m</i> or <i>a</i> is equal to the precision. If the precision is not * specified then the default value is {@code 6}. If the precision is * less than the number of digits to the right of the decimal point * then the value will be rounded using the ! * {@linkplain java.math.RoundingMode#HALF_UP round half up * algorithm}. Otherwise, zeros may be appended to reach the precision. * For a canonical representation of the value, use {@link * BigDecimal#toString()}. * * </tbody>
< prev index next >