public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/48511] New: Implement Steele-White algorithm for numeric output
@ 2011-04-08  8:07 thenlich at users dot sourceforge.net
  2011-04-08 15:58 ` [Bug libfortran/48511] " jvdelisle at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: thenlich at users dot sourceforge.net @ 2011-04-08  8:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48511

           Summary: Implement Steele-White algorithm for numeric output
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: thenlich@users.sourceforge.net


Created attachment 23923
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23923
Demonstration of correct rounding a la Steele-White

In their paper "How to Print Floating-Point Numbers Accurately" [1], Steele &
White describe an algorithm which for a internal binary floating-point number
outputs the shortest external decimal representation of that number which
converts back to the original number.

This should be implemented in libfortran, possibly as a separate I/O rounding
mode.

It would eliminate the problem of getting "odd" numbers, like 0.177699999999...
when the value 0.1977 is much shorter and represents the same exact binary
value.

Basically, their algorithm does the same as the attached program demonstrates,
only more efficiently.

[1] http://grouper.ieee.org/groups/754/email/pdfq3pavhBfih.pdf


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

end of thread, other threads:[~2015-08-25 12:58 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08  8:07 [Bug libfortran/48511] New: Implement Steele-White algorithm for numeric output thenlich at users dot sourceforge.net
2011-04-08 15:58 ` [Bug libfortran/48511] " jvdelisle at gcc dot gnu.org
2011-04-08 16:10 ` jvdelisle at gcc dot gnu.org
2011-04-09 21:19 ` jb at gcc dot gnu.org
2011-04-10  8:36 ` jb at gcc dot gnu.org
2011-04-10 10:20 ` thenlich at users dot sourceforge.net
2011-04-10 12:25 ` jb at gcc dot gnu.org
2011-04-27 14:17 ` thenlich at users dot sourceforge.net
2011-04-27 15:03 ` burnus at gcc dot gnu.org
2011-04-27 18:37 ` jb at gcc dot gnu.org
2011-04-28  9:30 ` jb at gcc dot gnu.org
2011-04-28 10:09 ` thenlich at users dot sourceforge.net
2011-04-29  1:42 ` jvdelisle at gcc dot gnu.org
2011-05-05 10:58 ` thenlich at users dot sourceforge.net
2015-08-25 12:58 ` fxcoudert at gcc dot gnu.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).