comp.lang.ada
 help / color / mirror / Atom feed
From: JP Thornley <jpt@diphi.demon.co.uk>
Subject: Re: AQS95 floatin point relational tests
Date: 1997/03/12
Date: 1997-03-12T00:00:00+00:00	[thread overview]
Message-ID: <552293175wnr@diphi.demon.co.uk> (raw)
In-Reply-To: dewar.858097577@merv


In article: <dewar.858097577@merv>  dewar@merv.cs.nyu.edu (Robert Dewar) 
writes:
> No, there is no FAQ on this issue, it is not an FAQ (it has come up
> twice in the history of CLA). If you have an old archive of CLA, you
> may be able to find the old thread.
> 

The results of delving into my own archive is given below. 
Clearly, anyone using the AQS should look carefully at 5.5.6 and 7.2.7,
as well as 7.2.2 to 7.2.4, and make the most sensible interpretation
they can of the relevant issues (bearing in mind that many people don't
understand the extent to which they don't understand the issues, and
that definitely includes me).

My original question (extract):-

I'm having difficulty understanding the statements in the Ada 
Quality and Style Guide on the portability of relational expressions 
with real operands:-

Section 5.5.6 - "... the use of <= is more portable than either < or ="

Section 7.2.7 (in the Chapter on Portability) -
   "Strict relational comparisons (<, >, =, /=) are a general problem
    with computations involving real numbers"

Robert Dewar's response (extract):-

Anmd wonders about the above quotes from AQ&S. To me they are plain
incorrect ...

The idea that equality testing on fpt numbers is always wrong is a myth
borne of unfamiliarity with floating-point semantics that refuses to 
die!

The idea that the use of <= is more portable than either < or = is 
particular rubbish, I see no possible justification for such a 
statement, and, unlike the old rule about avoiding equality, I cannot 
even guess the thought behind this misunderstanding.

Tucker Taft's response:-

This is a bug in AQ&S.  Several of the reviewers of AQ&S pointed out
this mistake, but alas, it somehow managed to slip through.  One claim
was that this statement was due to Norman Cohen, and hence indisputable.
However, Norm (or at least NC1, as we used to call his non-alter-ego ;-)
has since disavowed all connection with this statement.

and finally Norman Cohen's response:-

Tucker Taft wrote:
 
> This is a bug in AQ&S.  Several of the reviewers of AQ&S pointed out
> this mistake, but alas, it somehow managed to slip through.  One claim
> was that this statement was due to Norman Cohen, and hence indisputable.

Interesting argument, but I've rarely been able to use it successfully. ;-)

> However, Norm (or at least NC1, as we used to call his non-alter-ego ;-)
> has since disavowed all connection with this statement.

We *ALL* disavow any connection with this statement.

Hope this all helps.

Phil Thornley

-- 
------------------------------------------------------------------------
| JP Thornley    EMail jpt@diphi.demon.co.uk                           |
------------------------------------------------------------------------






  reply	other threads:[~1997-03-12  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-10  0:00 AQS95 floatin point relational tests William Dale Jr
1997-03-11  0:00 ` Robert Dewar
1997-03-12  0:00   ` JP Thornley [this message]
1997-03-13  0:00     ` David Wheeler
     [not found]   ` <332691DA.59C6@lmco.com>
1997-03-13  0:00     ` JP Thornley
1997-03-21  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