Failure of default_format_1.f90
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Oct 3 19:45:00 GMT 2007
FX,
It appears that either your testcase is bogus or (as I feared)
you broke gfortran cratering to the darwin platform. I added
output to your test and see
x = 2.22507385850710603E-308
trim(s) = 2.22507385850710603E-308
y = 2.22507385850710652E-308
program p
print '(I0,1X,I0)', digits(1.d0), precision(1.d0)
end program p
troutmask:sgk[243] gfc4x -o z p.f90
troutmask:sgk[244] ./z
53 15
1 23456789012345
2.22507385850710652E-308
^^^
There are garbage.
One can either check /usr/include/float.h of the expected
number of decimal digits or use real_info->precision to
determine a desirable value.
--
Steve
More information about the Fortran
mailing list