About the REAL constants in iso_fortran_env

FX fxcoudert@gmail.com
Wed Jul 8 23:29:00 GMT 2015


> 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.

Indeed. If what you want is quadruple precision, i.e. IEEE binary128 format, the correct kind for that is selected_real_kind(33, 4931).
This will binary128 if supported; if binary128 is not supported, it will return a kind value for a format with larger precision / range (unlikely on current hardware), or a negative value.

FX


More information about the Fortran mailing list