public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/18318] New: Printing an hexadecimal floating constant with negative exponent gives wrong result
@ 2015-04-24 13:38 olivier.gay at a3 dot epfl.ch
  2015-04-24 13:40 ` [Bug gdb/18318] " olivier.gay at a3 dot epfl.ch
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: olivier.gay at a3 dot epfl.ch @ 2015-04-24 13:38 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-11 16:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-24 13:38 [Bug gdb/18318] New: Printing an hexadecimal floating constant with negative exponent gives wrong result olivier.gay at a3 dot epfl.ch
2015-04-24 13:40 ` [Bug gdb/18318] " olivier.gay at a3 dot epfl.ch
2015-04-24 14:07 ` huguesdelassus at hotmail dot fr
2015-04-24 15:35 ` huguesdelassus at hotmail dot fr
2020-06-06 15:35 ` tromey at sourceware dot org
2020-06-11 16:35 ` cvs-commit at gcc dot gnu.org
2020-06-11 16:37 ` tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).