Paul Eggert wrote: > + Adams U. Ryū: fast float-to-string conversion. > + PLDI 2018. 270–282. <https://doi.org/10.1145/3192366.3192369>. */
For the 'float' and 'double' types, we could indeed use this code in Gnulib (copying the code from https://github.com/ulfjack/ryu, which can be redistributed under the Boost license, which allows such code to be included in LGPLv2+ projects (like what glibc does with e.g. with MIT-licensed code in glibc/sysdeps/ieee754/flt-32/*.c)). But for 'long double' with LDBL_MANT_DIG up to 113, the table of precomputed powers of 5 is 300 KB large (PDF page 278, figure 4); for this one, we should probably pick a slower algorithm with smaller tables. Should we work on this? Module 'dtoastr' is used by coreutils, emacs, pspp. But I have no idea how speed-critical dtoastr() is for them. Bruno