> > And is
> > the 2. instead of 2.D0 just a slip-up?
>
> It doesn't matter. Fortran has well-specified rules for numeric type
> conversion in expressions.
>
That's a very dangerous answer. Fortran's "well-specified rules" mean that
in most cases the kind of a real constant does matter. Try comparing
0.1*epsilon(1.0d0) with 0.1d0*epsilon(1.0d0) for example. Granted, in this
particular case it doesn't matter. For safety, surely it is best to ensure
real constants are always specified with appropriate kind.
Simon Harding.
|