DecimalFormat method format loses precision for doubles

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P1
    • 1.1.4
    • Affects Version/s: 1.1, 1.1.2
    • Component/s: core-libs
    • 1.1.4
    • x86, sparc
    • solaris_2.5.1, windows_95, windows_nt
    • Not verified

      import java.text.*;

      public class bug {
        public static void main(String[] args) {

          DecimalFormat nf = new DecimalFormat("##,###,###.00");
          System.out.println(nf.format(1.13));
        }
      }

      Should print 1.13 but displays 1.12

            Assignee:
            Norbert Lindenberg (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: