arXiv · 2207.02501
Computing elementary functions using multi-prime argument reduction
Abstract
We describe an algorithm for arbitrary-precision computation of the elementary functions (exp, log, sin, atan, etc.) which, after a cheap precomputation, gives roughly a factor-two speedup over previous state-of-the-art algorithms at precision from a few thousand bits up to millions of bits. Following an idea of Sch{\"o}nhage, we perform argument reduction using Diophantine combinations of logarithms of primes; our contribution is to use a large set of primes instead of a single pair, aided by a fast algorithm to solve the associated integer relation problem. We also list new, optimized Machin-like formulas for the necessary logarithm and arctangent precomputations.
Explore related subjects
Keep this discovery
Fredrik Johansson. 2022-07-06. Computing elementary functions using multi-prime argument reduction. https://arxiv.org/abs/2207.02501
Cite the original work for its findings. Save a collection to share your selection of sources.