bug with Z formatting REAL(10)?
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Oct 14 21:50:00 GMT 2009
Is this a bug with the Z formatting of REAL(10) result?
program z
implicit none
real(4) s
real(8) d
real(10) e
print '(3(i0,1x))', kind(s), kind(d), kind(e)
call random_seed()
call random_number(s)
write(*,'(E14.7,11X,Z16)') s, real(s,8)
call random_seed()
call random_number(d)
write(*,'(E22.15,3X,Z16)') d, real(d, 8)
call random_seed()
call random_number(e)
write(*,'(E24.17,1X,Z16))') e, real(e, 8)
!
! The next write fails due to an internal error, so
! Z formatting doesn't allow inspection of the last
! 4 bytes.
!
write(*,'(E24.17,1X,Z20))') e, e
end program z
troutmask:sgk[207] ./z
4 8 10
0.9975595E+00 3FEFEC0200000000
0.997559590092617E+00 3FEFEC0216E8495F
0.99755959009261720E+00 3FEFEC0216E8495F
Internal Error: bad integer kind
--
Steve
More information about the Fortran
mailing list