Is Fortran unable to do the addition between 865398.78 and -865398.78? Why the answer is -0.03?

The number 865398.78 is represented in single precision in your code. Single precision can handle about 7 significant digits, while your number has 8. You can make it double precision by writing

x=x+865398.78_8

Leave a Comment