comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: precise floats
Date: 1998/08/06
Date: 1998-08-06T00:00:00+00:00	[thread overview]
Message-ID: <dewar.902412781@merv> (raw)
In-Reply-To: slrn6shd17.1mo.pfk@schnecke.offl.uni-jena.de

Frank said

<<What about support of the 3 floating point types of the x86 architecture,
32-bit IEEE (7 digits), 64-bit IEEE (16 digits) and the internal FPU format
(19 digits).

Most compilers do *not* support the last.
>>

I am very surprised if that last statement is true. Most certainly GNAT
supports the extended precision type on the x86 (it is called Long_Long_Float).

Note that any compiler not supporting this type is not a conforming
implementation. B.2(10) is a normative requirement:

7   An implementation shall provide the following declarations in the visible
part of package Interfaces:

    8  Signed and modular integer types of n bits, if supported by the
       target architecture, for each n that is at least the size of a
       storage element and that is a factor of the word size.  The names
       of these types are of the form Integer_n for the signed types,
       and Unsigned_n for the modular types;

    9  For each such modular type in Interfaces, shifting and rotating
       subprograms as specified in the declaration of Interfaces above.
       These subprograms are Intrinsic.  They operate on a bit-by-bit
       basis, using the binary representation of the value of the
       operands to yield a binary representation for the result.  The
       Amount parameter gives the number of bits by which to shift or
       rotate.  For shifting, zero bits are shifted in, except in the
       case of Shift_Right_Arithmetic, where one bits are shifted in if
       Value is at least half the modulus.

   10  Floating point types corresponding to each floating point format
       fully supported by the hardware.

If your vendor claims conformance to the standard, or claims validated
status, then the failure to support this type should be reported as a
(serious in my view) bug. Note that no vendor can reasonably sign the
declaration of conformance for validation if they are aware of this
serious omission.

Note that in accordance with the standard, GNAT provides this type in
Interfaces, where it is called IEEE_Extended_Float.

In accordance with the implementation permission of 3.5.7(16), we also
provide this type in Standard with the name Long_Long_Float. We quite
realize that this is not in accordance with the implementation advice
in 3.5.7(17), but we consider this bad advice, since it seems clear to
us that this type should be a first class citizen, as it is in GNU C
(where it is the type long double).

Robert Dewar
Ada Core Technologies





  reply	other threads:[~1998-08-06  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-08-04  0:00 precise floats Bob Fletcher
1998-08-04  0:00 ` Corey Ashford
1998-08-04  0:00   ` Corey Ashford
1998-08-05  0:00     ` Frank Klemm
1998-08-06  0:00       ` Robert Dewar [this message]
1998-08-06  0:00         ` dennison
1998-08-07  0:00           ` Robert Dewar
1998-08-07  0:00           ` paul.english
1998-08-08  0:00             ` Robert Dewar
1998-08-12  0:00               ` Kevin Radke
1998-08-25  0:00               ` Gene Ouye
1998-08-10  0:00             ` dennison
1998-08-07  0:00         ` Tom Weis
1998-08-07  0:00           ` Robert Dewar
1998-08-04  0:00 ` David C. Hoos, Sr.
1998-08-05  0:00   ` Bob Fletcher
1998-08-04  0:00 ` Christopher Green
1998-08-05  0:00 ` Matthew Heaney
1998-08-09  0:00 ` Bob Fletcher
  -- strict thread matches above, loose matches on Subject: below --
1998-08-06  0:00 Robert Dewar
1998-08-06  0:00 ` Corey Ashford
1998-08-06  0:00 ` Samuel Mize
1998-08-07  0:00   ` Matthew Heaney
1998-08-07  0:00     ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox