3 ms·
In Fortran it is suggested that you define a module with a parameter specifying the working precision of real variables, perhaps with module kind_mod use
by Bostonian 3y ago
In Fortran it is suggested that you define a module with a parameter specifying the working precision of real variables, perhaps with
module kind_mod
use iso_fortran_env
integer, parameter :: wp = real64 ! or real32 or real128
end module kind_mod
use kind_mod
real(kind=wp) :: a, b, c
Then you change your entire program to use single, double or quadruple precision by changing the line that sets wp.