I use Lahey Fortran 95 version 5.6 in my programming. Unfortunately, I do not know why I get Inaccurate result when I run my program. For example, after running the following code:
PROGRAM TEST
IMPLICIT NONE
REAL:: A
DO A=1.0,3.0,0.2
WRITE (*,*) A
END DO
END PROGRAM TEST
I get the following result:
1.00000000
1.20000005
1.40000010
1.60000014
1.80000019
2.00000024
2.20000029
2.40000033
2.60000038
2.80000043
3.00000048
PROGRAM TEST
IMPLICIT NONE
REAL:: A
DO A=1.0,3.0,0.2
WRITE (*,*) A
END DO
END PROGRAM TEST
I get the following result:
1.00000000
1.20000005
1.40000010
1.60000014
1.80000019
2.00000024
2.20000029
2.40000033
2.60000038
2.80000043
3.00000048