This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gfortran: PR libfortran/20124 - incorrect rounding when writing floating point numbers


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  <coudert@clipper.ens.fr>
> 
>     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  <kargls@comcast.net>

        * io/write.c (output_float):  Typo in error meesage.

Oddly, enough I have a typo in the ChangeLog vis-a-vis meesage. :-0

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]