Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-4280

QString::number incorrectly rounds

    XMLWordPrintable

Details

    Description

      QString::number(78.625, 'f', 2); returns 78.62, while fcvt(...) in stl will return 78.63.

      Rejected:
      Not a bug. The following code also produces 78.62:

      int main()
      {
      printf("%.2f", 78.625);
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tmacieir Thiago Macieira (closed Nokia identity) (Inactive)
            z35liu Zheng Liu (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes