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 > An updated patch is attached and gives the expected result. $ gfc example.f90 $ ./a.out 0.666E+0 0.666E+0 I will update the commit log and test cases and re-submit for approval. Regards, Jerry