{
  "abstract": "Range reduction plays a crucial role in the accuracy and performance of evaluating trigonometric functions, and is often the primary bottleneck for large floating-point inputs. While fast algorithms such as Cody--Waite work efficiently over narrow intervals, the Payne--Hanek algorithm remains the standard technique for accurate reduction across large floating-point inputs. However, many existing implementations of Payne--Hanek suffer from high latency due to heavy branching, conversion overheads, and the use of multi-word integer arithmetic, which hinders SIMD vectorization. In this paper, we analyze and present a branch-free variation of the Payne--Hanek algorithm using only floating-point arithmetic. Our method operates directly over large double-precision inputs ($|x| \\ge 2^{16}$) and is well suited to hardware with FMA instructions. We formulate the precision constraints in terms of a truncation error budget, construct a compact lookup table indexed by the input exponent, and prove that the scaled reduced argument has absolute error below $2^{-110}$ and relative error below $2^{-60}$ for every input, including worst cases. The same routine can serve both as the complete range reduction of a single-stage implementation and as the fast path of a correctly rounded one, achieving higher throughput than existing implementations and lower latency than those returning a double-double reduced argument. The algorithm is currently implemented in the LLVM libc project.",
  "abstract_shown": true,
  "affiliations": [],
  "article_type": null,
  "arxiv": "2609.35015",
  "author_total": 1,
  "authors": [
    {
      "name": "Tue Ly"
    }
  ],
  "bibtex": "https://research.draconitic.com/paper/fke58s88da194.bib",
  "cited_by": 0,
  "doi": "10.48550/arxiv.2609.35015",
  "fulltext_url": null,
  "id": "fke58s88da194",
  "issns": [],
  "landing_url": "https://arxiv.org/abs/2609.35015",
  "language": null,
  "licence": "LicenseRef-arXiv-nonexclusive-1.0",
  "licence_label": "arXiv licence",
  "licence_source": "article",
  "licence_url": "http://arxiv.org/licenses/nonexclusive-distrib/1.0/",
  "metadata_licence": "CC0-1.0",
  "native_subjects": [
    [
      "arxiv",
      "cs.MS"
    ],
    [
      "arxiv",
      "cs.NA"
    ],
    [
      "arxiv",
      "math.NA"
    ],
    [
      "openalex",
      "1703|Numerical Methods and Algorithms"
    ]
  ],
  "openalex": "W7214786941",
  "pdf_url": "https://arxiv.org/pdf/2609.35015",
  "pmcid": null,
  "pmid": null,
  "published": "2026-10-01",
  "publisher": null,
  "ris": "https://research.draconitic.com/paper/fke58s88da194.ris",
  "sources": [
    {
      "first_seen": "2026-10-30T12:26:07Z",
      "native_id": "2609.35015",
      "source": "arxiv",
      "url": "https://arxiv.org/abs/2609.35015"
    }
  ],
  "subjects": [
    {
      "field": "mathematics",
      "origin": "arxiv:math.NA",
      "subfield": "numerical-analysis"
    }
  ],
  "title": "A performance enhancement of the Payne-Hanek range reduction algorithm",
  "title_text": "A performance enhancement of the Payne-Hanek range reduction algorithm",
  "type": "preprint",
  "updated_at": "2026-10-30T12:26:07Z",
  "url": "https://research.draconitic.com/paper/fke58s88da194",
  "venue": "arXiv",
  "versions": []
}