This is the mail archive of the
gcc@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 13:54:47 -0400 (EDT)
- Subject: Re: real_to_decimal rounds incorrectly
> I've forward-ported the logic from the previous real.c, and added
> some commentary so that the next person forced to maintain this
> code won't have to spend quite so long trying to figure out what's
> going on.
>
> If you have a literature reference to the algorithm being used here,
> it would be nice to add a pointer to it.
IEEE-specific modifications were taken from the IEEE spec.
Other than that, I draw a blank on references. It's just arithmetic.
Maybe Brad, the Purdue Profossor, can suggest some reading material.
Purdue is a world hotbed of numerical analysis work, by the way. It
would be wonderful if you could talk them into mounting a GNU support
project. But I'm afraid that mathematicians usually consider this
stuff too trivial and uninteresting to spend much time on.