Message text written by Swietanowski Artur
>For the sake of an example assume the following KIND value
declarations:
INTEGER, PARAMETER :: &
sngl = KIND(1.0), &
dbl = KIND(1.0D0), &
ldbl = SELECTED_REAL_KIND( P=24 )
You don't know whether 'sngl' and 'dbl' have the same representation
or a different one.<
Artur,
Yes you do. The standard, on p. 33, states that a real constant
without an exponent letter is default real (e.g. 1.0), and is double
precision real if it has the exponent letter D (e.g. 1.0D0). It states,
further,
that the decimal precision of the double precision real approximation
method shall be *greater* than that of the default method. So they
have to be different.
A real (no pun intended) hole in the portability comes when
developing code with, say, SELECTED_REAL_KIND(9) and getting
14 on the development processor but only 9 on a second one. If the
problem really (sorry) required 11, it will work on the first but not on
the second.
Regards,
Mike Metcalf
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|