Cody addresses the problem of checking the accuracy of programs that approximate mathematical functions, giving methods to test implementations of the functions &Ggr;(x), ln&Ggr;(x), and &psgr;(x)=&Ggr;′(x)/&Ggr;(x). The methods use identities to check the function values computed with a carefully selected range of arguments. This approach allows the test program to be portable, because it obviates the need for higher arithmetic precision than that used by the implementation being tested. A careful analysis of the implementation and testing of the test program is given, followed by results from the test program on three machines with a variety of function implementations. Finally, the paper discusses the assessment of robustness, that is, the ability of the program to cope with bad input and to produce meaningful results wherever possible or to signal difficulties.
This paper and the described test program will provide a foundation for test programs for general mathematical functions. The test method appears to be adequate to replace previous test methods based on the use of higher precision, and it has the advantage of being portable to various architectures and environments. Test programs based on these techniques will be incorporated in the SPECFUN collection of transportable special function programs.
Cody has provided another interesting paper on software for mathematical functions. It is a clear exposition of its subject; I noticed only two possible errors. The code for the exact calculation of best function arguments is valid only for non-negative values, and the inequality appears to be reversed in the exposition of robustness for arguments near zero. This paper is useful for those interested in mathematical software, and especially for those implementing such software.