James,
At 11:33 20-09-2000 -0600, James Giles <[log in to unmask]> wrote:
>W. J. Metzger <[log in to unmask]> wrote:
>...
>>How about sumx = sum( real( x, kind(0d0) ) )
>
>Or (possibly better):
>
> sumx = sum( real(x, kind(sumx) ) )
>
>This way you can change to double, quad, or whatever by
>simply redeclaring SUMX. No need to rewrite code fragments.
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
>J. Giles
>
--
Meilleures Salutations,
Kindest Regards,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
mailto:[log in to unmask]
Phone: +31 15 278 50 17
Fax: +31 15 278 37 87
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|