Fortran improper output on AIX and Linux -
i have scenario declare variable real*8 , read value
0.1234123412341234
which stored in file.
when try read on linux variable , display value, prints
0.12341234123412
whereas when run same code aix prints value
0.12341234123412370
why both platform print different values same code? there possibility overcome without using format specifier?
p.s
aix compiler xlf
linux compiler ifort
i assume using list-directed io, write (x, *)
. while type of io convenient, output not specified standard. if want output extremely similar across compilers , platforms, should use format. (you might still have small variations in results due use of finite-precision arithmetic.)
Comments
Post a Comment