Version 1.1 of ais/ai-00099.txt

Unformatted version of ais/ai-00099.txt version 1.1
Other versions for file ais/ai-00099.txt

!standard A.5.1 (01)          97-04-11 AI95-00099/01
!class confirmation 95-10-12
!status WG9 approved (8-0-0) 97-07-04
!status ARG approved (6-0-1) 97-04-11
!status work item 95-10-12
!status received 95-10-12
!priority Low
!difficulty Easy
!subject Accuracy requirements for elementary functions
!summary 95-10-12
If an implementation does not support the Numerics Annex, there are no specific accuracy requirements for the elementary functions.
!question 95-10-12
The accuracy requirements for the elementary functions are defined in Annex G, support for which is optional.
For an implementation that doesn't support Annex G, are there any accuracy requirements? Is an implementation in which Sqrt(2.0) returns 1.4 conforming? 1.5? 42?
!response 95-10-12
Since support for the Numerics Annex is optional, the accuracy requirements given there need not be obeyed if the Numerics Annex is not supported.
!appendix

!section A.5.1(01)
!subject Accuracy requirements for elementary functions
!reference RM95-A.5.1(1.a)
!reference RM95-G.2.4
!from Keith Thompson 95-10-04
!reference as: 95-5313.a Keith Thompson 95-10-5>>
!discussion

The accuracy requirements for the elementary functions are defined in
Annex G, support for which is optional.

For an implementation that doesn't support Annex G, are there *any*
accuracy requirements?  Is implementation in which Sqrt(2.0) returns
1.4 conforming?  1.5?  42?

I suppose this is a "quality of implementation" issue, but how can
validation tests for the elementary functions be written correctly?

****************************************************************

!section A.5.1(01)
!subject Accuracy requirements for elementary functions
!reference RM95-A.5.1(1.a)
!reference RM95-G.2.4
!reference 95-5313.a Keith Thompson 95-10-5
!from Bob Duff
!reference as: 95-5319.a Robert A Duff 95-10-10>>
!discussion

> The accuracy requirements for the elementary functions are defined in
> Annex G, support for which is optional.
> 
> For an implementation that doesn't support Annex G, are there *any*
> accuracy requirements?  Is implementation in which Sqrt(2.0) returns
> 1.4 conforming?  1.5?  42?

No, there are no accuracy requirements, and yes, and implementation that
returns an arbitrarily bogus answer is conforming.

> I suppose this is a "quality of implementation" issue, but how can
> validation tests for the elementary functions be written correctly?

Yes, I think this is a "quality of implementation" issue.  IMHO,
validation tests should require some reasonably close answer.
Implementations can dispute it if they want to.

The Standard doesn't require implementations to support more than
10-line programs, but the validation tests do.  The accuracy
requirements seem similar -- if an implementation always returns "42" as
the sqrt of anything, the validation tests should fail it, even though
that's not strictly required by the Standard.  If some implementer
disputes that, then we can deal with it on a case-by-case basis.

By the way, note that 2.0+2.0 can be 5.0, according to a strict reading
of the Standard.  If people want "+" to do something reasonable, then
they can rely on reasonable implementers.  If they want particular
accuracy requirements, then users need to demand a Numerics-compliant
implementation.

- Bob

****************************************************************

Questions? Ask the ACAA Technical Agent