Have you found any with C source that uses no libraries other than POSIX standard? On 8/31/12, Warren Smith <warren.wds@gmail.com> wrote:
Here are two papers on this topic cited in the Steele-White retrospective:
David M. Gay: Correctly Rounded Binary-Decimal and Decimal-Binary Conversions (1990) http://citeseer.ist.psu.edu/viewdoc/download?doi=10.1.1.31.4049&rep=rep1&typ... Gay's algorithm is implemented (I think) inside his language AMPL, and also available from netlib.
Robert Burger , R. Kent Dybvig: Printing Floating-Point Numbers Quickly and Accurately, http://citeseer.ist.psu.edu/viewdoc/download;jsessionid=EC593AC56FA08763D0A9... They say Steele & White's print algorithm is "unacceptably slow for practical use." B&D's algorithm is implemented inside "chez scheme."
It seems to me all these algorithms are VERY complicated. There must be something better than any of them...
-- Robert Munafo -- mrob.com Follow me at: gplus.to/mrob - fb.com/mrob27 - twitter.com/mrob_27 - mrob27.wordpress.com - youtube.com/user/mrob143 - rilybot.blogspot.com