The code I inherited mixes real*8, real(8), real(kind=8) and double precision, and newer files use real(dp) with dp defined in a module. They all seem to give 64-bit reals with gfortran.
Are these really equivalent, which form should I standardise on, and why does real(dp) :: x = 0.1 print as 0.10000000149011612 instead of 0.1 when the variable is supposed to be double precision?




