Print

Print


----- Original Message -----
From: "Neil Carlson" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wednesday, March 31, 2004 2:38 PM
Subject: Re: configurable default real


> On Wed, 2004-03-31 at 15:29, Robin wrote:
> > > Date:          Tue, 30 Mar 2004 23:58:55 -0500 (EST)
> > > From:          [log in to unmask]
> > > It would be a great convenience for such users if there were a
"standard"
> > > means of interfacing to a generic binary computer, with two's
complement
> > > integers, byte sized characters, 16, 32, and 64 bit integers and
logicals, 32, 64, and
> > > 128(?)
> >
> > 80 is a common size.
>
> Not really, is it?  x86 processors have internal 80 bit fp registers
> but anything that has to go out to memory gets truncated to 64 bits.
> Since a high-level like Fortran can't/shouldn't make assumptions
> about where in the system a fp value is, an 80 bit kind really isn't
> feasible here.  Are there systems that actually support 80 bit fp
> numbers fully?
gcc supports 80 bit floating point numbers, on most platforms with
appropriate hardware.  So do most commercial C compilers which attempt any
degree of gcc compatibility.  This includes saving to memory in that format
(along with 16 to 48 wasted bits).  Nothing prevents Fortran from doing the
same on the same platforms, except practicality.  Fortran has more
satisfactory syntax support than C, e.g. selected_real_kind(18), unless you
prefer the C scheme of silently dropping back to double when deemed more
practical.  The trend is away from supporting extended double, as the
"64-bit" Windows for 32-bit extended architectures doesn't even permit use
of the extended registers, and hardware support for vector is generally
restricted to 32- and 64-bit formats.