On Wednesday, 17 October 2001, at 14:7,
Richard Maine <[log in to unmask]> wrote:
> Bob Cohen writes:
> > At 01:01 PM 10/17/01 -0700, you wrote:
> > >Double precision just means more than single. That's pretty much all
> > >that the standard guarantees. It could be one bit more....
> >
> > The above paragraph doesn't seem to be consistent with the one below.
>
> > >The standard also guarantees that a double precision quantity uses
> > >twice the memory of a single, but that memory doesn't all have to be
> > >put to constructive use....
>
> I don't see what is inconsistent about it (which is good, as they are
> both true). Perhaps you miss the definition of precision and the
> point about "constructive use". The precision of double is required
> to be more than that of single. That basically means that there has
> to be at least one more bit "constructively used". The memory used
> has to be exactly twice that of single - no more and no less. This
> may well mean that there are bits of padding. Bits that are included
> just for padding would not contribute to precision. They are just
> padding (so that things like equivalence work as expected).
Related side issue: (Ignore at will).....
And as Richard knows, the same is true for INTEGERs. They must take up
the same MEMORY space as a REAL, but nothing says how many bits must be
"constructively used". Cray vector machines used to use 46bits of 64, though
I think most are on default 64 of 64 now. NEC uses 53bits of 64.
Why does this matter? Some people think they can check for a 64bit kind
via selected_int_kind(18). Not so. For NEC/Cray you are safer checking
selected_int_kind(14). Are there any other machines that do this for integers?
Is there a safe portable select value?
Cheers,
Len
--
[log in to unmask]:+61 3 9669 8109: CSIRO/Bureau of Meteorology
High Performance Computing and Communications Centre
24th floor, 150 Lonsdale St | GPO Box 1289K, Melbourne, VIC 3001 Australia
|