> This is all very interesting, but does it help you much? X is single
> precision, and converting it to double, does not add a bit to this
> precision, or ??
>
> Example:
>
> ! [JvO] 2000-09-21 xx.f90
> real :: x = 123.4567
> double precision :: y
>
> y = dble(x)
> print *, x, y
> end
>
> D:\FORTRAN\TEST>xx ! From Salford FTN95:
> 123.457 123.456703186
>
> D:\FORTRAN\TEST>xx ! From Absoft F90
> 123.457 123.456703186035
That's not the point. The original example had a sum. One reason for
summing in double precision would be to avoid roundoff error. If one
does the sum in single precision, then converts to double, then one just
essentially pads the affected-by-roundoff-error result with zeros.
However, if one converts the individual addends to higher precision
first and then does the sum, some roundoff error can be avoided.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|