English

Efficient implementation of elementary functions in the medium-precision range

Mathematical Software 2015-06-10 v2 Numerical Analysis

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.

Keywords

Cite

@article{arxiv.1410.7176,
  title  = {Efficient implementation of elementary functions in the medium-precision range},
  author = {Fredrik Johansson},
  journal= {arXiv preprint arXiv:1410.7176},
  year   = {2015}
}

Comments

Submitted to ARITH 22

R2 v1 2026-06-22T06:37:09.570Z