Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5066788

(fmt) Formatter.format("%.2g", 99.9) prints "10" instead of "1.0e+02"

XMLWordPrintable

    • b59
    • generic
    • solaris_8

      printf prints the wrong value in the following test case.

      class B {
          public static void main(String[] args) {
              System.out.printf("%.2g%n", 99.9);
          }
      }

            iris Iris Clark
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: