> Date: Tue, 14 Nov 2000 18:15:14 +0100
> From: [log in to unmask] (Phillip Helbig)
> > real( double_k) :: pi = 3.1415926_double_k
> >
> > The "_double_k" on the literal is necessary
> > to get a double_k value. Otherwise, it's
> > a default real value, which may not be double_k.
>
> If it weren't for the restriction on initialisation expressions, one
> could write dble(3.1415926).
Others have already pointed out that "dble" doesn't prevent the constant
from being stored as single precision.
Even if it did, there's another reason for not using "dble" to change the type
of this constant (particularly if it is in the executable section of the
program) --
"dble" may require a function evaluation. 3.1541926d0 does not.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|