Range reduction based on Pythagorean triples for trigonometric function evaluation

Software evaluation of elementary functions usually requires three steps: a range reduction, a polynomial evaluation, and a reconstruction step. These evaluation schemes are designed to give the best performance for a given accuracy, which requires a fine control of errors. One of the main issues is to minimize the number of sources of error and/or their influence on the final result. The work presented in this article addresses this problem as it removes one source of error for the evaluation of trigonometric functions. We propose a method that eliminates rounding errors from tabulated values used in the second range reduction for the sine and cosine evaluation. When targeting correct rounding, we show that such tables are smaller and make the reconstruction step less expensive than existing methods. This approach relies on Pythagorean triples generators. Finally, we show how to generate tables indexed by up to 10 bits in a reasonable time and with little memory consumption.

[1]  Christoph Quirin Lauter,et al.  Basic building blocks for a triple-double intermediate format , 2005 .

[2]  Jean-Michel Muller,et al.  Elementary functions - algorithms and implementation (2. ed.) , 2006 .

[3]  Jonathan Richard Shewchuk,et al.  Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates , 1997, Discret. Comput. Geom..

[4]  Milos D. Ercegovac,et al.  (M, p, k)-Friendly Points: A Table-Based Method for Trigonometric Function Evaluation , 2012, 2012 IEEE 23rd International Conference on Application-Specific Systems, Architectures and Processors.

[5]  Donald E. Knuth,et al.  The art of computer programming. Vol.2: Seminumerical algorithms , 1981 .

[6]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[7]  J.-M. Muller,et al.  A new scheme for table-based evaluation of functions , 2002, Conference Record of the Thirty-Sixth Asilomar Conference on Signals, Systems and Computers, 2002..

[8]  Shmuel Gal Computing Elementary Functions: A New Approach for Achieving High Accuracy and Good Performance , 1985, Accurate Scientific Computations.

[9]  Shmuel Gal,et al.  An accurate elementary mathematical library for the IEEE floating point standard , 1991, TOMS.

[10]  H. Lee Price The Pythagorean Tree: A New Species , 2008, 0809.4324.

[11]  James Demmel,et al.  IEEE Standard for Floating-Point Arithmetic , 2008 .

[12]  Jean-Michel Muller,et al.  Elementary Functions: Algorithms and Implementation , 1997 .

[13]  Abraham Ziv,et al.  Fast evaluation of elementary mathematical functions with correctly rounded last bit , 1991, TOMS.

[14]  Arnaud Tisserand,et al.  Multipartite table methods , 2005, IEEE Transactions on Computers.

[15]  Albert Fässler Multiple Pythagorean number triples , 1991 .

[16]  David Defour,et al.  Cache-Optimised Methods for the Evaluation of Elementary Functions , 2006 .

[17]  J. Muller,et al.  CR-LIBM A library of correctly rounded elementary functions in double-precision , 2006 .

[18]  Debjit Das Sarma,et al.  Faithful bipartite ROM reciprocal tables , 1995, Proceedings of the 12th Symposium on Computer Arithmetic.

[19]  Ping Tak Peter Tang,et al.  Table-lookup algorithms for elementary functions and their error analysis , 1991, [1991] Proceedings 10th IEEE Symposium on Computer Arithmetic.

[20]  Dong Wang,et al.  $(M,p,k)$-Friendly Points: A Table-Based Method to Evaluate Trigonometric Function , 2014, IEEE Transactions on Circuits and Systems II: Express Briefs.

[21]  Arnaud Tisserand,et al.  The Table Maker's Dilemma , 1998 .

[22]  Damien Stehlé,et al.  Gal's accurate tables method revisited , 2005, 17th IEEE Symposium on Computer Arithmetic (ARITH'05).