[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Easy Accurate Reading and Writing of Floating-Point Numbers
From: |
Bruno Haible |
Subject: |
Re: Easy Accurate Reading and Writing of Floating-Point Numbers |
Date: |
Wed, 20 May 2020 00:37:34 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-177-generic; KDE/5.18.0; x86_64; ; ) |
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
There are several other algorithms for this purpose.
There is an overview by RyanJuckett at
http://www.ryanjuckett.com/programming/printing-floating-point-numbers/
The papers I know of are:
* Guy L. Steele Jr, Jon L White
"How to Print Floating-Point Numbers Accurately"
1990
* Robert G. Burger, R. Kent Dybvig
"Printing Floating-Point Numbers Quickly and Accurately"
1996
* Florian Loitsch
"Printing Floating-Point Numbers Quickly and Accurately with Integers"
2010
* Marc Andrysco, Ranjit Jhala, Sorin Lerner
"Printing Floating-Point Numbers"
2016
Then there's also the algorithm, by Michael Stoll and me (1990),
in GNU clisp and CLN (based on multiprecision arithmetic, not hardware floats).
Bruno
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, (continued)
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Marc Nieper-Wißkirchen, 2020/05/20
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Bruno Haible, 2020/05/23
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Marc Nieper-Wißkirchen, 2020/05/23
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Bruno Haible, 2020/05/23
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Marc Nieper-Wißkirchen, 2020/05/23
- Re: Easy Accurate Reading and Writing of Floating-Point Numbers, Paul Eggert, 2020/05/23
Re: Easy Accurate Reading and Writing of Floating-Point Numbers,
Bruno Haible <=