Unified Tables for Exponential and Logarithm Families

Accurate table methods allow for very accurate and efficient evaluation of elementary functions. We present new single-table approaches to logarithm and exponential evaluation, by which we mean that a single table of values works for both log(<i>x</i>) and log(1 + <i>x</i>), and a single table for <i>e</i><i>x</i> and <i>e</i><i>x</i> − 1. This approach eliminates special cases normally required to evaluate log(1 + <i>x</i>) and <i>e</i><i>x</i> − 1 accurately near zero, which will significantly improve performance on architectures which use SIMD parallelism, or on which data-dependent branching is expensive. We have implemented it on the Cell/B.E. SPU (SIMD compute engine) and found the resulting functions to be up to twice as fast as the conventional implementations distributed in the IBM Mathematical Acceleration Subsystem (MASS). We include the literate code used to generate all the variants of exponential and log functions in the article, and discuss relevant language and hardware features.