[Patch, libgfortran] Improvement to float output - updated patch

Jerry DeLisle jvdelisle@verizon.net
Tue Apr 4 00:13:00 GMT 2006


DeLisle, Jerry V wrote:
> I did not have access to any other compiler.  I can also provide the
> following format easily if this is more sensible.  I had it doing this
> before I looked at Ifort.  :)
> 
> 01234567890123456789
>               0.D+00
> 
> So I will do this instead.  I will wait a few days to see if there are
> any other comments.
> 
> Best Regards,
> 
> Jerry
> 

This patch is even easier.  I will commit instead as obvious.

Have a good day!

Jerry

Index: io/write.c
===================================================================
*** io/write.c	(revision 112632)
--- io/write.c	(working copy)
*************** output_float (st_parameter_dt *dtp, cons
*** 473,479 ****
              ndigits - 1, value);

     /* Check the resulting string has punctuation in the correct places.  */
!   if (buffer[2] != '.' || buffer[ndigits + 2] != 'e')
         internal_error (&dtp->common, "printf is broken");

     /* Read the exponent back in.  */
--- 473,479 ----
              ndigits - 1, value);

     /* Check the resulting string has punctuation in the correct places.  */
!   if (d != 0 && (buffer[2] != '.' || buffer[ndigits + 2] != 'e'))
         internal_error (&dtp->common, "printf is broken");

     /* Read the exponent back in.  */



More information about the Fortran mailing list