Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-13050

Double values in arrays are shown with too low precision

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 3.3.0-beta1
    • Qt Creator 2.8.1
    • Debugger
    • None
    • Kubuntu Precise amd64, QtCreator compiled from source; many other machines with varying QtCreator versions.
    • 812c10341d5b746d7f5c33f4212f8934d9362e6f

    Description

      Here's a sample C program (the bug also happens with similar C++ version):

      #include <stdio.h>
      int main()
      {
      double array[1];
      array[0]=1.21316436272737e+5;
      fprintf(stderr,"%lf\n",array[0]);
      }

      How to reproduce the bug:

      1. Place a breakpoint on fprintf() call.
      2. Run up to this point.
      3. In "Locals and expressions" window open the "array" dropdown.
      4. See value of 121316
      5. Step over fprintf() call.
      6. See actual value printed on the console

      This lack of precision at step 4 doesn't happen if I explicitly add evaluated expression for this array element (right mouse button on it -> first menu element).

      Attachments

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

        Activity

          People

            hjk hjk
            10110111 Ruslan Kabatsayev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes