I am trying read some values from Fortran like below:
526.54789076609,
123.03020447201
and my code:
program readPrecise
parameter ( u1=31,maxSize=2 )
real massVector(maxSize)
open(UNIT=u1,FILE="shellMatrices.mtx",FORM="FORMATTED",STATUS='OLD')
read(u1,'(F15.11)'), massVector
close(UNIT=u1)
stop
end
Output:
526.54791259766
123.03020477295
I can read from the file but there is precision problem and it is reading some values wrong, even if I use 'F15.11' format, somehow it is changing my data. If you have any idea about how I can solve this problem, it would be great.Thanks in advance