public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "thenlich at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/48511] New: Implement Steele-White algorithm for numeric output Date: Fri, 08 Apr 2011 08:07:00 -0000 [thread overview] Message-ID: <bug-48511-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2011-04-08 8:07 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-08 8:07 thenlich at users dot sourceforge.net [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48511-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).