comp.lang.ada
 help / color / mirror / Atom feed
* AQS95 floatin point relational tests
@ 1997-03-10  0:00 William Dale Jr
  1997-03-11  0:00 ` Robert Dewar
  0 siblings, 1 reply; 6+ messages in thread
From: William Dale Jr @ 1997-03-10  0:00 UTC (permalink / raw)



Robert Dewar wrote:
> 
> Phil Thornely quite reasonably questions the recommendations in AQ&S with
> respect to floating-point comparisons. We have already had an extended
> CLA thread on this topic, and the conclusion was that the AQ&S recommendations
> here are badly flawed and should be ignored.

Do you mean that the guidline is flawed or that the language is flawed?
Is there a FAQ on this issue I can read offline?

-- 
================================
William L. Dale       								
n2rhv@amsat.org   (home-pageless)  
================================




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AQS95 floatin point relational tests
  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
       [not found]   ` <332691DA.59C6@lmco.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Dewar @ 1997-03-11  0:00 UTC (permalink / raw)



William asks

<<> Phil Thornely quite reasonably questions the recommendations in AQ&S with
> respect to floating-point comparisons. We have already had an extended
> CLA thread on this topic, and the conclusion was that the AQ&S recommendations
> here are badly flawed and should be ignored.

Do you mean that the guidline is flawed or that the language is flawed?
Is there a FAQ on this issue I can read offline?
>>

The guidelines are plain wrong, the language is fine.

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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AQS95 floatin point relational tests
  1997-03-11  0:00 ` Robert Dewar
@ 1997-03-12  0:00   ` JP Thornley
  1997-03-13  0:00     ` David Wheeler
       [not found]   ` <332691DA.59C6@lmco.com>
  1 sibling, 1 reply; 6+ messages in thread
From: JP Thornley @ 1997-03-12  0:00 UTC (permalink / raw)



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                           |
------------------------------------------------------------------------






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AQS95 floatin point relational tests
  1997-03-12  0:00   ` JP Thornley
@ 1997-03-13  0:00     ` David Wheeler
  0 siblings, 0 replies; 6+ messages in thread
From: David Wheeler @ 1997-03-13  0:00 UTC (permalink / raw)



JP Thornley (jpt@diphi.demon.co.uk) wrote:

: 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...

And said Tucker Taft's response was:

: 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.

I'd like to see the AQ&S corrected.
Any suggestions on how this might be accomplished?
One possibility: someone could try to develop a correction that the
original AQ&S reviewers agree to.


--- David A. Wheeler
    dwheeler@ida.org





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AQS95 floatin point relational tests
       [not found]   ` <332691DA.59C6@lmco.com>
@ 1997-03-13  0:00     ` JP Thornley
  1997-03-21  0:00       ` Robert Dewar
  0 siblings, 1 reply; 6+ messages in thread
From: JP Thornley @ 1997-03-13  0:00 UTC (permalink / raw)



In article: <332691DA.59C6@lmco.com>  William Dale Jr 
<William.Dale.Jr@lmco.com> writes:
> As I am currently writting an Ada 95 Standard based on the AQ&S95 
> document I am interested in this issue and any others regarding this 
> document.  ...

> Anyone who can point me toward any other serious issues with the AQS 
> please jump in.  
> 
> 

I'm just coming to the end of this exercise (review draft sent for 
copying) and haven't come across any *major* problems other than the 
floating point issues mentioned in my previous post.

One particular point that I think is wrong (but this is my personal 
opinion) is the recommendation (in the rationale of 5.9.6) that 
"Initialization at the point of declaration is safest as well as easiest 
for maintainers." [Hope that doesn't start that thread again.]

One possible problem comes from turning Guidelines (many of which start 
"Consider using ..." or "Use caution when ...") into a standard.  How 
big a problem this is depends on how readily you need to be able to show 
conformance. (The Ada 83 AQS had one guideline that said something like 
"know the Ada model for real arithmetic" - and conformance would 
presumeably have required the programmer to take a test :-)

If you are keeping the examples in the AQS then they are rather poor at 
following their own guidelines on things such as naming, spacing, 
alignment etc.  

Also I have built up quite a number of minor comments on the AQS (typos 
and other such) that anyone keeping the bulk of the AQS text might be 
interested in (but it would be a very unpopular post to the newsgroup).

BTW the contacts named in the Preface are no longer with the SPC.  I 
have been annoying Rob Pettit (pettit@software.org) with my detailed 
comments.

Phil Thornley

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






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AQS95 floatin point relational tests
  1997-03-13  0:00     ` JP Thornley
@ 1997-03-21  0:00       ` Robert Dewar
  0 siblings, 0 replies; 6+ messages in thread
From: Robert Dewar @ 1997-03-21  0:00 UTC (permalink / raw)



JP Thornley said

<<One possible problem comes from turning Guidelines (many of which start
"Consider using ..." or "Use caution when ...") into a standard.  How
big a problem this is depends on how readily you need to be able to show
conformance. (The Ada 83 AQS had one guideline that said something like
"know the Ada model for real arithmetic" - and conformance would
presumeably have required the programmer to take a test :-)>>

That is a very good point, there are many guidelinbes in AQ&S which are
excellent guidelines but would be horrible as absolute rules.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-03-21  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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