This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/48511] Implement Steele-White algorithm for numeric output
- From: "thenlich at users dot sourceforge.net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 5 May 2011 10:57:54 +0000
- Subject: [Bug libfortran/48511] Implement Steele-White algorithm for numeric output
- Auto-submitted: auto-generated
- References: <bug-48511-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48511
--- Comment #13 from Thomas Henlich <thenlich at users dot sourceforge.net> 2011-05-05 10:57:33 UTC ---
G95 is actually using this method for list-directed output.
print *, .3, .33, .333, .3333, .33333, .333333, .3333333
g95 => 0.3 0.33 0.333 0.3333 0.33333 0.333333 0.3333333
gfortran => 0.300000012 0.330000013 0.333000004 0.333299994 0.333330005
0.333332986 0.333333313
From ftoa.c:
/* All software  1996 Robert G. Burger. Permission is hereby granted,
...
* This code is described in an article by Robert G. Burger and
* R. Kent Dybvig in "Proceedings of the ACM SIGPLAN '96 Conference on
* Programming Language Design and Implementation", pages 108-116, May
* 1996.
*
* Modified for use with g95 by Andy Vaught. Thanks Bob!
*/