I'm trying to understand the difference between these two:
REAL*8 X
X=1.5D0
WRITE(6,*) (0.6D0 + (2*x)/5.)
WRITE(6,*) (0.6 + (2*x)/5.D0)
I would expect them to give identical results, but I get instead
1.2000000000000000
1.2000000238418580
Why is 0.6 not cast to double precision in the second case even if it is supposed to be summed to a value in double precision? What is happening?