This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] gfortran: PR libfortran/20124 - incorrect rounding when writing floating point numbers
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Fran??ois-Xavier Coudert <Francois-Xavier dot Coudert at lcp dot u-psud dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, gfortran <fortran at gcc dot gnu dot org>
- Date: Thu, 24 Feb 2005 10:01:06 -0800
- Subject: Re: [PATCH] gfortran: PR libfortran/20124 - incorrect rounding when writing floating point numbers
- References: <421E1096.firstname.lastname@example.org>
On Thu, Feb 24, 2005 at 06:36:22PM +0100, Fran??ois-Xavier Coudert wrote:
> This patch, *strapped and regtested on i686-linux, fixes PR 20124.
> Some details: I would have liked to be able not to use another variable
> (which I called nzero_real), but I couldn't find any simple other way to do
> it. So, we store in nzero_real the number of leading zeros in the
> fractionnal part of the floating point number, whatever the width of the
> format is.
Cool. I was looking at this problem. Now, I can scratch it off my list.
> 2005-02-24 Fran??ois-Xavier Coudert <email@example.com>
> PR libfortran/20124
> * write.c (output_float): Adds a nzero_real variable to store the
> number of leading zeros whatever the format width is. Corrects the
> rounding of numbers less than 10^(-width). Fixes typo in an error message.
> Updates copyright years.
Another ChangeLog nit. The lines should be indented to the same level.
Also, you should include your diffs as attachments. If you inline the
diff in the body of a email, many email programs will mangle tabs to
spaces (which makes it harder to test the patch).
> /* We should always know the field width and precision. */
> if (d < 0)
> - internal_error ("Uspecified precision");
> + internal_error ("Unspecified precision");
2005-02-21 Steven G. Kargl <firstname.lastname@example.org>
* io/write.c (output_float): Typo in error meesage.
Oddly, enough I have a typo in the ChangeLog vis-a-vis meesage. :-0