This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug stdio/19853] New: Printing IBM long double in decimal with high precision is incorrect


https://sourceware.org/bugzilla/show_bug.cgi?id=19853

            Bug ID: 19853
           Summary: Printing IBM long double in decimal with high
                    precision is incorrect
           Product: glibc
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: murphyp at linux dot vnet.ibm.com
  Target Milestone: ---

printf("%.34Le",x)

x = 5.192296858534827628530496329220032e33L
or 0x1.ffffffffffffffffffffffffff80p+111

The expected result is:
5.192296858534827628530496329220032e33L

The actual result is:
5.192296858534827628530496329220096e33L (1.p112)

The value is represented by the double pair {1.p112,-1p.12}. It appears the
conversion lost a bit of precision somewhere along the way.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]