[Patch, libgFortran] Increase the default precision for real(16) by one
Richard Sandiford
rsandifo@nildram.co.uk
Sun Jan 20 01:21:00 GMT 2008
Tobias Burnus <burnus@net-b.de> writes:
> Using the current settings write(*,*) x sometimes does not print all
> possible digits of real(16) variables on S/380.
>
> The result is that gfortran.dg/default_format_2.f90 FAILs. That test
> case contains effectively:
>
> x = 1.0_16
> do i = 0, 200
> write (s,*) x
> read (s,*) y
> if (y /= x) res = res + 1
> x = nearest(x,-huge(x))
> end do
>
> On S/380 this fails 7 times with the current setting; for these abs(x-y)
> = 9.6296497219361792652798897129246366E-0035.
>
> The solution is to simply print one more digit by default; one
> additionally has to enlarge then the size of one character string in the
> test suite as it is otherwise to short. I don't know whether it solves
> some of the other failures on REAL(16) systems such as Debian's SPARC;
> presumably it won't help on PowerPCs where the glibc seems to have a bug
> (if I read PR24685 correctly).
Thanks for doing this. For the record, the test was also failing on
NewABI MIPS systems, but is fixed by your patch. We're now down to
zero gfortran failures for all three mips64-linux-gnu ABIs.
Richard
More information about the Fortran
mailing list