simplify integer precision handling
essentially, it should be ok to always use the default integer (which is 32 bit unless using MSC.Marc) and use 64 bit integer only for special cases where an overflow could happen
This commit is contained in:
parent
05eb80d38c
commit
51f8b1961f
|
@ -15,12 +15,10 @@ module prec
|
||||||
! https://software.intel.com/en-us/blogs/2017/03/27/doctor-fortran-in-it-takes-all-kinds
|
! https://software.intel.com/en-us/blogs/2017/03/27/doctor-fortran-in-it-takes-all-kinds
|
||||||
|
|
||||||
integer, parameter, public :: pReal = IEEE_selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-300 (typically 64 bit)
|
integer, parameter, public :: pReal = IEEE_selected_real_kind(15,307) !< number with 15 significant digits, up to 1e+-300 (typically 64 bit)
|
||||||
#if (INT==4)
|
#if(INT==8)
|
||||||
integer, parameter, public :: pInt = selected_int_kind(9) !< number with at least up to +-1e9 (typically 32 bit)
|
|
||||||
#elif (INT==8)
|
|
||||||
integer, parameter, public :: pInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
integer, parameter, public :: pInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
||||||
#else
|
#else
|
||||||
NO SUITABLE PRECISION FOR INTEGER SELECTED, STOPPING COMPILATION
|
integer, parameter, public :: pInt = selected_int_kind(9) !< number with at least up to +-1e9 (typically 32 bit)
|
||||||
#endif
|
#endif
|
||||||
integer, parameter, public :: pLongInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
integer, parameter, public :: pLongInt = selected_int_kind(18) !< number with at least up to +-1e18 (typically 64 bit)
|
||||||
integer, parameter, public :: pStringLen = 256 !< default string length
|
integer, parameter, public :: pStringLen = 256 !< default string length
|
||||||
|
|
Loading…
Reference in New Issue