Have this burning question on my mind right now: What is the "accepted" way to declare double precision real in modern Fortran? In order from oldest to newest, the story seems to go like this: DOUBLE PRECISION
, then REAL(kind=8)
, then INTEGER, PARAMETER :: dp=kind(1.d0)
with REAL(kind=dp)
--Metcalf now says dp=kind(0.d0)
--and now float32=selected_real_kind(6,37)
or float64=selected_real_kind(15,307)
. So...
- How should I be declaring double precision real now?
- Is
kind
redundant inREAL(kind=dp)
? - Are there any special flags needed at compile time to invoke double precision real with
gfortran
orifort
?