Fast Evaluation of Elementary Mathematical Functions with Correctly Rounded Last Bit
Abstract
Methods for fast and accurate evaluation of the elementary mathematical functions (sin, COS, exp, log, etc) are needed in order to program elementary function routines Such routines are widely used m every floating-point computation envu-onment. This 1s true for small scientific calculators as well as for the largest existing supercomputers, The art of performing this type of evaluation has already reached a point where fast computation M possible with accuracy that is very close to the theoretical limit, namely, the accuracy reached by correctly rounding to nearest the exact value of the function evaluated to fit into the data format reserved for the output The accuracy of the results produced by these routines is quite satisfactory There is one important aspect, though, in which they are not sufficiently perfect: Any changes, even slight, m the algorithm may produce changes m the output. For this reason it is vmtually impossible to achieve full compatibility among different routines with the known fast evaluation techniques Such compatibility is valuable for several reasons (e g., portability of software, standardization), In this paper a general methodology m suggested that is expected to produce the �ultimate� type of elementary function routines: fast routines that produce results which are always identical to the machine numbers, obtained by correctly rounding the exact values of the function evaluated. The rounding rule need not be �round to nearest � C)ther rounding rules can be implemented also Actually, the method is expected to work for all transcendental elementary functions, for all possible floating point data formats, and for all reasonable rounding rules. With this type of routine, full cornpatibihty M achievable in a most natural way. © 1991, ACM. All rights reserved.