[patch, libgfortran] PR111022 ES0.0E0 format gave ES0.dE0 output with d too high.

Jerry D jvdelisle2@gmail.com
Sat Feb 3 03:17:55 GMT 2024


On 1/30/24 12:36 PM, Harald Anlauf wrote:
> Hi Jerry,
> 
> Am 30.01.24 um 19:15 schrieb Jerry D:
>> The attached patch attempts to fix the handling of the EN0.0E0 and
>> ES0.0E0 formatting by correctly calculating the number of digits needed
>> for the exponents and building those exponents into the float string.
> 
> while your patch addresses ENw.dE0 and ESw.dE0 formatting,
> it does not fix Ew.dE0, which can be seen with the following test:
> 
>    write(buffer,"(E0.3E0)") .6660_4
>    print *, buffer
>    write(buffer,"(E0.3)") .6660_4
>    print *, buffer
> 
> I get even with your patch:
> 
>   0.666
>   0.666
> 
> but would have expected:
> 
>   0.666E+0   ! F2018 & F2023, table 13.1
>   0.666E+0   ! F2023, table 13.1
> 

Tha attached file shows the complete revised patch and git log generated 
by using the 'git show' command. I only just discovered that one. (eye 
roll).

Regressions tested on x86-64.  OK for trunk?

Regards,

Jerry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: submitlog.diff
Type: text/x-patch
Size: 19710 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240202/bec03dcc/attachment-0001.bin>


More information about the Fortran mailing list