Am Mi., 20. Mai 2020 um 00:37 Uhr schrieb Bruno Haible <br...@clisp.org>:

> Marc Nieper-Wißkirchen wrote:
> > for output, the shortest rounded
> > representation that still reads back accurately has to be selected.
> > ...
> > A simple algorithm is given by Aubrey Jaffer in [1].
> >
> > [1] http://people.csail.mit.edu/jaffer/III/EZFPRW

This was just one, which I liked because of its simplicity. (And
because it is written in my favorite programming language.)

[...]

> There are several other algorithms for this purpose.

There is also the new Ryu algorithm by Ulf Adams, see [2].
Interestingly, he has found some problems in Jaffer's algorithm, see
the paper [3].

[...]

> Then there's also the algorithm, by Michael Stoll and me (1990),
> in GNU clisp and CLN (based on multiprecision arithmetic, not hardware 
> floats).

I didn't know this; I will check this out.

The initial version of "c_dtoastr" will, however just work as "dtoastr" does.

Marc

--

[2] https://github.com/ulfjack/ryu

[3] https://dl.acm.org/doi/10.1145/3296979.3192369

Reply via email to