Efficient implementation of elementary functions in the medium-precision range
Fredrik Johansson

TL;DR
This paper presents a highly efficient implementation of elementary transcendental functions for medium-precision arithmetic up to 4096 bits, outperforming existing libraries like MPFR in speed while maintaining rigorous error bounds.
Contribution
The authors introduce a novel implementation combining table-based argument reduction, rectangular splitting, and GMP's mpn layer to significantly accelerate elementary function computations at medium precision.
Findings
Achieves up to 30x speedup over MPFR for atan
Provides rigorous error bounds for all functions
Efficiently handles variable precision up to 4096 bits
Abstract
We describe a new implementation of the elementary transcendental functions exp, sin, cos, log and atan for variable precision up to approximately 4096 bits. Compared to the MPFR library, we achieve a maximum speedup ranging from a factor 3 for cos to 30 for atan. Our implementation uses table-based argument reduction together with rectangular splitting to evaluate Taylor series. We collect denominators to reduce the number of divisions in the Taylor series, and avoid overhead by doing all multiprecision arithmetic using the mpn layer of the GMP library. Our implementation provides rigorous error bounds.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNumerical Methods and Algorithms · Cryptography and Residue Arithmetic · Digital Filter Design and Implementation
