This is the mail archive of the
mailing list for the GCC project.
Re: Implementing real*16 in Fortran
-----BEGIN PGP SIGNED MESSAGE-----
On Sunday 03 August 2003 20:54, Jakub Jelinek wrote:
> On Sun, Aug 03, 2003 at 01:17:19PM +0200, Erik Schnetter wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > I want to implement real*16 in Fortran. For that I seem to need
> > two things:
> > (1) For run time libraries, I need a corresponding C type. I think
> > the best thing would be to use long double for that, but it has to
> > have a sizeof of 16. On i386, the option -m128bit-long-double does
> > just this. Is there a way to declare a type that does not need this
> > option? I
> I don't think IA-32/IA-64/amd64 TFmode (ieee_extended_128)
> is what you're looking for. That's still the same thing as XFmode,
> but padded to 16 bytes.
> Doesn't Fortran mandate IEEE quad format (TFmode on sparc and a
> couple of other platforms), ie. 1 bit sign, 15 bits exponent, 112+1
> bits of mantissa?
Fortunately, Fortran does not mandate any kind of precision. I want to
choose this format because it is implemented in hardware on i386
processors. I think that the alternative would require a special code
and/or out-of-line routines for floating point operations. I have no
experience with such libraries, and attaching them to gcc is probably
more difficult than using the 10-byte format after extending it to 16
Erik Schnetter <email@example.com>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----