This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: real_to_decimal rounds incorrectly
- From: Stephen L Moshier <steve at moshier dot net>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 19 Oct 2002 21:36:25 -0400 (EDT)
- Subject: Re: real_to_decimal rounds incorrectly
On Sat, 19 Oct 2002, Richard Henderson wrote:
> On Sat, Oct 19, 2002 at 01:54:47PM -0400, Stephen L Moshier wrote:
> > IEEE-specific modifications were taken from the IEEE spec.
> > Other than that, I draw a blank on references. It's just arithmetic.
>
> By inference, it appears to be (a variation of) Steele & White's 1990
> algorithm.
>
> I havn't been able to get hold of the original paper, not being an
> ACM member, but I've found a few papers that expand on Steele & White's,
> and which give a description good enough to recognize the salient points.
I really can't say. The program was written in 1978. The remarks in
the standard and the thesis of Coonen were helpful for the
modifcations that were made when the IEEE standard came out.
Those are the suggestions like padding zeros to minimize the power of 10.
I've just been looking through the books I have on numerical
methods, but there seems to be nothing at all in them about
radix conversion techniques. Maybe Knuth's book has something.