Progressive polynomial approximations for fast correctly rounded math libraries
Mridul Aanjaneya, Jay P. Lim, Santosh Nagarakatte
Abstract
This paper presents a novel method for generating a single polynomial approximation that produces correctly rounded results for all inputs of an elementary function for multiple representations. The generated polynomial approximation has the nice property that the first few lower degree terms produce correctly rounded results for specific representations of smaller bitwidths, which we call progressive performance. To generate such progressive polynomial approximations, we approximate the correctly rounded result and formulate the computation of correctly rounded polynomial approximations as a linear program similar to our prior work on the RLIBM project. To enable the use of resulting polynomial approximations in mainstream libraries, we want to avoid piecewise polynomials with large lookup tables. We observe that the problem of computing polynomial approximations for elementary functions is a linear programming problem in low dimensions, i.e., with a small number of unknowns. We design a fast randomized algorithm for computing polynomial approximations with progressive performance. Our method produces correct and fast polynomials that require a small amount of storage. A few polynomial approximations from our prototype have already been incorporated into LLVM’s math library.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- Fast shadow execution for debugging numerical errors using error free transformationsSangeeta Chowdhary, Santosh NagarakatteOOPSLA 2022 · 13 citations
- Implementation and Synthesis of Math Library FunctionsIan Briggs, Yash Lad, Pavel PanchekhaPOPL 2024 · 7 citations
- MiSo: A DSL for Robust and Efficient Solve and MInimize ProblemsFederico Sichetti, Enrico Puppo, Zizhou Huang, Marco Attene et al.SIGGRAPH 2025 · 1 citation
- Maximum Consensus Floating Point Solutions for Infeasible Low-Dimensional Linear Programs with Convex Hull as the Intermediate RepresentationMridul Aanjaneya, Santosh NagarakattePLDI 2024 · 1 citation
- Correctly Rounded Math Libraries without Worrying about the Application's Rounding ModeSehyeok Park, Justin Kim, Santosh NagarakattePLDI 2025 · 1 citation
Builds on3
- An approach to generate correctly rounded math libraries for new floating point variantsJay P. Lim, Mridul Aanjaneya, John L. Gustafson, Santosh NagarakattePOPL 2021 · 21 citations
- High performance correctly rounded math libraries for 32-bit floating point representationsJay P. Lim, Santosh NagarakattePLDI 2021 · 19 citations
- One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modesJay P. Lim, Santosh NagarakattePOPL 2022 · 15 citations
Related papers
- NFGen: Automatic Non-linear Function Evaluation Code Generator for General-purpose MPC PlatformsXiaoyu Fan, Kun Chen, Guosai Wang, Mingchun Zhuang et al.CCS 2022 · 9 citations
- Fast linear programming through transprecision computing on small and sparse dataTobias Grosser, Theodoros Theodoridis, Maximilian Falkenstein, Arjun Pitchanathan et al.OOPSLA 2020 · 4 citations
- LIBSHALOM: optimizing small and irregular-shaped matrix multiplications on ARMv8 multi-coresWeiling Yang, Jianbin Fang, Dezun Dong, Xing Su et al.SC 2021 · 40 citations
- FPL: fast Presburger arithmetic through transprecisionArjun Pitchanathan, Christian Ulmann, Michel Weber, Torsten Hoefler et al.OOPSLA 2021 · 10 citations
- SURF: A Simple, Universal, Robust, Fast Distribution Learning AlgorithmYi Hao, Ayush Jain, Alon Orlitsky, Vaishakh RavindrakumarNeurIPS 2020 · 6 citations
