comp.lang.ada
 help / color / mirror / Atom feed
From: gwinn@res.ray.com (Joe Gwinn)
Subject: Re: Does Ada 95 conform to the IEEE 754 floating point standard?
Date: 1998/02/04
Date: 1998-02-04T00:00:00+00:00	[thread overview]
Message-ID: <gwinn-0402981333140001@dh5055139.res.ray.com> (raw)
In-Reply-To: 6b8fdn$qrh17@beaker.nit.gwu.edu


Ada95 allows one to use the arithmetic built into the processor one's
program runs on.  If that hardware complies to IEEE 754, so much the
better, but Ada has nothing to do with it, and nor should it.

IEEE 754 is a hardware representation, handled by the computer.  To access
these 32-bit single-real numbers, one must declare variables as type
"float" in ANSI C or type "FLOAT" in Ada [LRM section 3.5.7].  To access
64-bit double-real numbers, one must declare variables as type "double" in
C or type "LONG_FLOAT" in Ada [Ada LRM section 3.5.7].  In Fortran-77
[ANSI X3.9-1978, Section 4], these types are called "real" and "double
precision" respectively.

Note that it isn't enough to say only that a variable is a single (32-bit)
float or a double (64-bit) float.  There must be fifty different
floating-point formats in existence, especially in legacy systems.  IEEE
754 is steadily displacing all other formats, but it will be some time
before all other formats have totally disappeared.


Joe Gwinn



In article <6b8fdn$qrh17@beaker.nit.gwu.edu>, sam818@seas.gwu.edu (Samir
N. Muhammad) wrote:

> Hello Everyone
> 
> Does anyone know whether the Ada 95 standard say anything about the
conformance
> of Ada 95 to the IEEE 754 standard (i.e. floating point standard). I checked 
> some sections of the standard and could not find such information. Any
pointers
> (especially to the standard) are highly appreciated.
> 
> 
> Thanks in advance
> Samir Muhammad




  parent reply	other threads:[~1998-02-04  0:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-02-04  0:00 Does Ada 95 conform to the IEEE 754 floating point standard? Samir N. Muhammad
1998-02-04  0:00 ` Robert Dewar
1998-02-04  0:00 ` Joe Gwinn [this message]
1998-02-04  0:00   ` Matthew Heaney
1998-02-05  0:00     ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1997-12-03  0:00 Samir N. Muhammad
1997-12-03  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