comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: The disturbing myth of Eiffel portability
Date: 1996/11/21
Date: 1996-11-21T00:00:00+00:00	[thread overview]
Message-ID: <dewar.848577581@merv> (raw)
In-Reply-To: E17FM8.9Gs@thomsoft.com


Keith said

"Agreed.  It's important to remember, though, that the behavior of IEEE
arithmetic can change depending on the current rounding mode, and the
programmer may or may not have direct control over that.  However, I
don't think that affects any cases where it makes sense to test for
exact equality."


No, that's wrong. the IEEE 754 and 854 standards (that is what we are
referring to when we informally talk of IEEE arithmetic), require that
a programmer not only have control over the rounding mode, but that this
control must be *dynamic*, i.e. that a given section of code must be
able to be executed with different rounding modes.

Any so called IEEE arithmetic implementation that does not meet this
requirement is non-standard.

In practice, everyone operates in round-to-nearest all the time, I have
never encountered an IEEE compliant or even semi-compliant system in which
this was not the default.

One thing to remember about the IEEE standard is that it is NOT a hardware
standard. Generally any implementation of the standard involves a
combination of software and hardware.

When chip manufacturers say they provide IEEE arithmetic, they do NOT
mean that any language operating on that chip is automatically IEEE
standard conforming, instead they mean that their base arithmetic more
or less matches the IEEE model (sometimes less than more, recently
there have been some disturbing departures from the IEEE model, e.g.
the failure to provide denormals on the MIPS R10000).

Ada 95 as defined out of the box is nowhere near IEEE compliant. For
example it lacks handling of infinities and NaN's. But it is indeed
the case that Ada 95 has been designed to be compatible with the
standard, in the sense that it is quite possible to provide an IEEE
compliant implementation without violating Ada 95 semantics (which
were carefully designed to make sure that was the case).

I did a draft of a proposed IEEE binding for Ada 95 some time ago, and
one of my students, Sam Figueroa, has been following up on this and
refining the draft, as well as investigating some fundamental issues
revolving around floating-point semantics in languages like Ada. However,
there has been insufficient interest for this work to be finished so far






  reply	other threads:[~1996-11-21  0:00 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-15  0:00 The disturbing myth of Eiffel portability The Rt Rev'd Colin James III, KOTM 1/96
1996-11-17  0:00 ` Eoin Woods
1996-11-17  0:00 ` The Rt Rev'd Colin James III, KOTM 1/96
1996-11-18  0:00   ` James Youngman
1996-11-20  0:00     ` Piercarlo Grandi
1996-11-21  0:00       ` Paul Johnson
1996-11-27  0:00         ` Piercarlo Grandi
1996-11-28  0:00           ` Don Harrison
1996-11-29  0:00             ` Piercarlo Grandi
1996-11-29  0:00               ` Don Harrison
1996-11-30  0:00                 ` Piercarlo Grandi
1996-12-01  0:00                 ` Jon S Anthony
1996-12-02  0:00                   ` Piercarlo Grandi
1996-11-29  0:00             ` Piercarlo Grandi
1996-11-29  0:00               ` Robert Dewar
1996-11-29  0:00               ` Robert Dewar
1996-11-20  0:00   ` Jeff Miller
1996-11-20  0:00     ` Piercarlo Grandi
1996-11-17  0:00 ` Lawrence Kirby
1996-11-18  0:00 ` Stephen J Bevan
1996-11-19  0:00 ` Kaz Kylheku
1996-11-19  0:00   ` Robert Dewar
1996-11-20  0:00     ` Matt Kennel
1996-11-22  0:00       ` Robert Dewar
1996-11-20  0:00     ` Larry Kilgallen
1996-11-21  0:00       ` Robert Dewar
1996-11-22  0:00         ` Larry Kilgallen
1996-11-22  0:00           ` Robert Dewar
1996-12-01  0:00             ` Graham C. Hughes
1996-12-01  0:00               ` Robert Dewar
1996-12-02  0:00                 ` Brian R. Hanson
1996-12-06  0:00                   ` Robert Dewar
1996-12-09  0:00                     ` Brian R. Hanson
1996-11-26  0:00         ` Van Snyder
1996-11-22  0:00       ` Ken Garlington
1996-11-25  0:00         ` Robert Dewar
1996-11-21  0:00     ` Keith Thompson
1996-11-21  0:00       ` Robert Dewar [this message]
1996-11-22  0:00       ` Norman H. Cohen
1996-11-24  0:00       ` Lawrence Kirby
1996-11-21  0:00     ` Francois Labreque
1996-11-21  0:00       ` Kaz Kylheku
1996-11-24  0:00       ` Robert Dewar
1996-11-20  0:00   ` James Mansion
1996-11-20  0:00     ` Kaz Kylheku
1996-11-25  0:00   ` Joachim Durchholz
1996-11-26  0:00     ` Lawrence Kirby
replies disabled

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