About the REAL constants in iso_fortran_env

Angelo Graziosi angelo.graziosi@alice.it
Wed Jul 8 23:09:00 GMT 2015



Il 09/07/2015 00:52, FX ha scritto:
> REAL128 specifies, according to the standard, "a REAL type whose storage size expressed in bits is 128”.
> On x86_64-linux, the storage size of both extended-precision (kind=10) and quadruple precision (kind=16) is equal to 128 bits. Both 10 and 16 are thus valid values for REAL128.

Oh.. If I understand, we CANNOT use REAL128 to define the quad-precision 
in our applications but still have to rely on selected_real_kind() 
function. For example

   integer, parameter :: QP = selected_real_kind(30,300)

May be, prudentially, we should not use the the other constants REAL??.

Re-reading 
https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html#ISO_005fFORTRAN_005fENV

if we insist to use the iso_fortran_env module, we should use the 
REAL_KINDS() and INTEGER_KINDS() arrays..

Thanks a lot,
  Angelo.

> Check the comp.lang.fortran thread over there:
> https://groups.google.com/forum/#!searchin/comp.lang.fortran/"real128"$20"iso_fortran_env"|sort:date/comp.lang.fortran/ThADTdybGmA/CePXaAoePz4J
>
> FX
>



More information about the Fortran mailing list