Cody and Waite specified their algorithms for the computation of the elementary functions in a language-independent way, although they wrote the accompanying ELEFUNT test package in Fortran. In principle, it should be straightforward to implement their recipes in any programming language on any operating system and any arithmetic system. However, for any particular environment, there are likely to be issues that need to be considered. In this chapter we discuss features of the C language and of the IEEE 754 arithmetic system that affect the implementation of the mathcw library, but we first examine a fundamental mathematical limitation on the accuracy of function evaluation.
Unable to display preview. Download preview PDF.