Bruno Haible wrote:
- Some schemers even thought it was worthwhile to write a paper about their
  implementation of this specification. [3].

Yes, Gnulib addresses this problem in the ftoastr module, using a simpler but presumably less-efficient approach. As it happens, an improved algorithm was published by the Lerner group in POPL'16, so I installed the attached.
From 3f68a6e543c082884ea81ae14f7d9a3f043d9640 Mon Sep 17 00:00:00 2001
From: Paul Eggert <egg...@cs.ucla.edu>
Date: Sat, 22 Apr 2017 18:34:07 -0700
Subject: [PATCH] ftoastr: cite a newer paper

* lib/ftoastr.c (FTOASTR): In comment, cite Andrysco et al. 2016
instead of Loitsch 2010.
---
 ChangeLog     | 6 ++++++
 lib/ftoastr.c | 8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b365e9e..ad436a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-22  Paul Eggert  <egg...@cs.ucla.edu>
+
+	ftoastr: cite a newer paper
+	* lib/ftoastr.c (FTOASTR): In comment, cite Andrysco et al. 2016
+	instead of Loitsch 2010.
+
 2017-04-22  Bruno Haible  <br...@clisp.org>
 
         poll: Enable argument check also in the Windows implementation.
diff --git a/lib/ftoastr.c b/lib/ftoastr.c
index ef861e2..f243416 100644
--- a/lib/ftoastr.c
+++ b/lib/ftoastr.c
@@ -105,10 +105,10 @@ FTOASTR (char *buf, size_t bufsize, int flags, int width, FLOAT x)
   /* The following method is simple but slow.
      For ideas about speeding things up, please see:
 
-     Florian Loitsch, Printing floating-point numbers quickly and accurately
-     with integers.  ACM SIGPLAN notices 46, 6 (June 2010), 233-243
-     <http://dx.doi.org/10.1145/1809028.1806623>; also see the
-     2010-03-21 draft <http://florian.loitsch.com/tmp/article.pdf>.  */
+     Andrysco M, Jhala R, Lerner S. Printing floating-point numbers:
+     a faster, always correct method. ACM SIGPLAN notices - POPL '16.
+     2016;51(1):555-67 <http://dx.doi.org/10.1145/2914770.2837654>; draft at
+     <http://cseweb.ucsd.edu/~lerner/papers/fp-printing-popl16.pdf>.  */
 
   PROMOTED_FLOAT promoted_x = x;
   char format[sizeof "%-+ 0*.*Lg"];
-- 
2.7.4

Reply via email to