I write here a simple fortran code, in which i want to write 4 variables in double precision in free format using write(*,*), but the printed format is different in ifort with gfortran and lahey fortran compiler. This is just a example program. My actual code is very big and i don't want to change it depending on compiler issue. Is there any work around for it?program main Implicit none Real*8 a,b,c,d a = 2.0d0;b = a+0.20d0; c = b-1.2d0; d = 3.0d0; write(*,*) a,b,c,d end program mainIf I add a format, the results will be same from all compilers. But what to do with free format?
For more complete information about compiler optimizations, see our Optimization Notice.