robin wrote:
>> Date: Tue, 28 Sep 2004 22:58:09 +0000
>> From: [log in to unmask]
...
>> Check your compiler documentation. Some compilers support what's
>> usually called Quad precision. Some don't. If you have access to
>> several, you might get lucky. Fortran90 allows processors to support
>> higher precisions. A simple experiment is to try something like
>> Do I = 1,50
>> print *, I, selected_real_kind(I)
>> Enddo
>
> This won't necessarily do it.
>
> Better is: print *, selected_real_kind(precision(1.0d0)+1)
> A negative value indicates that quad precision is not available.
That doesn't do the same thing as Dick Hendrickson's code.
So, it depends on what you want whether your solution is
really better. If you want to know if there's a KIND that
holds more precision than double precision (whether it
meets any definition of "quad" or not), your program is
fine. If you want to know, for precisions between 1 and 50
decimal digits inclusive, whether there is (are) KIND(s)
supporting that (those) precision(s) and, if so, what the(ir)
KIND number(s) is (are), then Hendrickson's solution is
better. There's no rule against all the results from Hendrickson's
program being the same KIND number and for that correspond to
single precision.
--
J. Giles
"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare
|