To start, I attempted to search for an answer to this but am not quite sure what to search for.
I have a test program:
program realtest real*8 V1, V2, V3 integer*4 i V1 = 1.0d0 V2 = 0.1d0 V3 = 0.0d0 do i = 1,50 V3 = V1+V2 write(*,77) V3 77 FORMAT(F35.30) V1 = V3 enddo end
V1 and V2 have the proper values, with 0’s filled in. However after the 6th iteration my V3 = 1.600000000000001 and the resolution continues to fluctuate for the values after that. Is there a way to specifiy the ‘d0’ in the V3=V2+V1 statement or am I doing something wrong like in my other posting on real*8’s? Thanks for helping me understand this better.