Project 41: Specification of elementary functions
Pasadena 1984:
==============
(Hull - Cody): Should we try to agree on recommended specifications
for the elementary functions? They could look something like the
following :
The functions are
sqrt, sin, cos, log, exp, arctan, power, and possibly also
arcsin, arccos, tan, cotan.
The accuracy requirements are
for f(x) ; return (i+eps1) f(x(1+eps2))
for f(x,y), return (1+eps1) f(x(1+eps2), y(1+eps3))
where |eps1| < few ulps,
|eps2|, |eps3| < small fraction of an ulp
also eps2 = 0 for sqrt, and |sin|, |cos| <= 1.
Limitations
function range exceptions
sqrt x >= 0 fail
sin/cos all -
log > 0 fail
exp some interval overflow, underflow
arctan all -
power complicated o, u, i, z, f
arcsin/arccos [-1,1] fail
tan, cotan all o, u, z
Also provision for continuing after exception.
Implications
1. For large enough x, sin x and cos x may have no significant figure
of accuracy.
2. log must satisfy requirements for all positive arguments.
3. power cannot be evaluated sufficiently accurately with straight
forward use of log and exp.
[ref. to book by Cody and Waite].
The group agrees by 15 yes, 0 no, 2 abstentions that a document
should be prepared along the above lines. Again Lawson, Cody, Hull
agree to prepare the document.
The subgroup for both documents consists of: Aird, Einarsson,Feldmann,
Ford, Paul, Reid, Smith.
Sophia-Antipolis 1985:
======================
Specifications for the elementary mathematical functions (Lawson)
-----------------------------------------------------------------
Background The elementary function libraries supplied with new
machines and/or compilers are frequently deficient.
Purpose and Approach
(a) Describe functional specifications (e.g. accuracy, domain,
exceptions) that are reasonably attainable by subprograms for the
list of elementary functions given on page 21 of the minutes of the
1984 meeting.
(b) Establish a methodology and terminology for describing the
accuracy of a mathematical function.
(c) Describe testing and the presentation of test results.
ELEFUNT type tests
Comparison- with higher precision functions
(d) Not complete. Will cite references.
Intended Audience
(a) Implementors
Reasonable goals that are easily attainable
Indications of how to attain these goals, citing
references where possible.
Indications of accuracy proofs where available.
(b) Customer/User
To show what he/she can reasonably expect.
Lawson will send a document to the subgroup.
Elementary functions names (Paul)
---------------------------------
Gentleman proposed to use the mathematical notations
log10 x, loge x = ln x, log2 x, for logarithms.
Argonne 1986:
=============
No work was done on this project over the past year (Lawson). However,
the value of the project was reaffirmed and Lawson, Cody and Hull plan
to do work on the project over the next year.
Como 1987:
==========
Document: IFIP/WG 2.5 (Como-25), 1425, 17 pages (THIS DOCUMENT IS NOT
FOR REDISTRIBUTION OUTSIDE WG 2.5)
Lawson and Hull: The goal is to describe the accuracy that can
reasonably be expected in subprograms for computation of the usual
elementary functions. Over the past year the subgroup have come to the
decision that this project must include mathematical analyses to
support the statements of attainable accuracy and the plan is to
supplement the report by providing software for doing detailed testing
of elementary function subprograms.
In the discussion that followed Gaffney said that he was involved in
testing packages for special functions with portability as one of the
principal requirements, and that a modified Cody's package was used.
Ford noted that the question of elementary functions in Ada is still
open and there are always programmers who wish to write their own
elementary functions and therefore a paper as described by Hull would
be extremely helpful. The paper received support from other members of
the group (Kulisch, Stetter, Gaffney, Gentleman, Smith). Gaffney and
Vouk were of the opinion that it is very important to influence
vendors and make them aware of the importance of properly implemented
elementary functions since implementations available in some
commercial systems are very deficient. Smith noted, in reference to
document 1425, that for each of the elementary functions the
manufacturer needs to provide at least the lower accuracy bound, and
as much machine independence as possible (but also provide notation
appropriate for a particular language community). Software validation
efforts need information on whether, for example, a specified accuracy
is attained etc. Rice stressed that in practice languages should
provide a user with proper and accurate elementary functions, and that
only exceptionally should a user have to program elementary functions.
Stanford 1988:
==============
Documents: IFIP/WG 2.5 (Stanford-22) 1522, 45 pages
(only for WG 2.5 internal use),
IFIP/WG 2.5 (Stanford-23) 1523, 26 pages (only for WG 2.5 internal use),
IFIP/WG 2.5 (Stanford-26) 1526, 1 page,
IFIP/WG 2.5 (Stanford-27) 1527, 1 pages,
IFIP/WG 2.5 (Stanford-30) 1530, 1 pages.
In the scope of this project reports were presented by W.J. Cody and C. Lawson.
W.J. Cody reported on the work on generic elementary functions in Ada
(1526, 1530), and on the work on portable implementations of
elementary and special functions (1527). The latter work will also
appear in a forthcoming TOMS issue.
The following is the summary of the report presented by C. Lawson.
The distributed documents (1522, 1523) contain draft papers CM-528,
CM-529, and CM-530. The 1983 version of the Brent's
multiple-precision package was adapted for FORTRAN 77 and used to
support FORTRAN 77 packages DTFN and STFN. The latter are
"transportable" packages providing a general testing capability for
univariate and bivariate function subprograms by comparison of version
in different precisions. Graphs were presented showing the "relative
error amplification factor" and the error in ULP's inherent to
nineteen univariate elementary functions.
A proposal was made for a paper to be jointly written by those
associated with Project [41].
Beijing 1989:
=============
Hanson informed the group that he had ported Lawson's testing package
for the elementary Fortran 77 functions to several environments.
Lawson's plans are to submit a translation of Brent's original Fortran
66 programmed floating point to Fortran 77 for publication in ACM-
TOMS.
Several other members also have copies of Lawson's package.
Discussion turned to IEEE arithmetic chips and the possibility of
having elementary function chips.
It was noted that there is a potential problem with some chips that
"claim" IEEE compatibility because of residual inconsistencies. Only
very few of the chips are truly compatible (e.g. Intel and Motorola).
Sometimes floating point features conform with IEEE standards, but
other features may not. (Fosdick, Paul, Einarsson).
Kulisch would like to see elementary functions for interval
input/output. Dekker stressed that specifications for elementary
functions should be language independent (re: Tang's work). Paul noted
that chip based elementary functions could be a problem because
standardization may freeze the evolution of the algorithms, may lead
to some undesirable simplifications, etc. In addition, right now the
problem is too complex for a single chip (Hanson). Fosdick would like
the group to keep an eye on the matter in case elementary function
chips do appear.
Jerusalem 1990:
===============
Documents:
IFIP/WG 2.5 (Beijing-13) 1613, 35 pages (there is now Draft 1.1, Oct 89)
IFIP/WG 2.5 (Jerusalem-15) 1712, 2 pages,
IFIP/WG 2.5 (Jerusalem-15) 1715, 15 pages,
IFIP/WG 2.5 (Jerusalem-16) 1716, 20 pages.
Dekker (Ada) and Kulisch (Fortran-SC) discussed their work relevant to
the project.
Oxford 1996:
===========
This will remain active and Tang will prepare a descriptive paragraph.
Cody, Gaffney, Kok are deleted from people list and Walter added.
Remove comments and put links to other standards efforts. Walter will
monitor WG11 and LIA-2 activities. Hull, Hanson, Tang, and Hodgeson
(of NAG) have active projects here.
Ottawa 2000:
============
Elementary function library for the Itanium processor
-----------------------------------------------------
Tang presented an overview of the difficulties associated with
developing accurate single and double precision versions of elementary
functions for the next generation of chips.
With 128 fp registers and the most `natural' operation being a `fused
multiply and add' it becomes quite tricky to develop efficient
accurate techniques.
Documents:
==========
1. J. Kok, "Design and implementation of elementary functions in Ada",
Report NM-R8710, University of Amsterdam, Centre for Mathematics and
Computer Science, April 1987.
2. J. Kok, "Proposal for standard mathematical packages in Ada",
Report NM-R8718, University of Amsterdam, Centre for Mathematics and
Computer Science, November 1987.
3. M. Bergman, "Implementation of elementary functions in Ada",
Report NM-R8709, University of Amsterdam, Centre for Mathematics and
Computer Science, April 1987.
4. M. Bergman, "Testing of elementary functions in Ada",
Report NM-R8909, University of Amsterdam, Centre for Mathematics and
Computer Science, May 1989.