This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB 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 gdb/18318] New: Printing an hexadecimal floating constant with negative exponent gives wrong result


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

            Bug ID: 18318
           Summary: Printing an hexadecimal floating constant with
                    negative exponent gives wrong result
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: olivier.gay at a3 dot epfl.ch

Printing an hexadecimal floating constant with positive exponent is OK:

(gdb) p/f 0x00.1p0
$1 = 0.0625
(gdb) p/f 0x00.1p1
$2 = 0.125

but if the exponent is negative then the result is wrong:

(gdb) p/f 0x00.1p-1
$3 = -0.9375

The expected result is 0.031250.

Tested with gdb 7.9.

-- 
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]