An approach to generate correctly rounded math libraries for new floating point variants
Jay P. Lim, Mridul Aanjaneya, John L. Gustafson, Santosh Nagarakatte
Abstract
Given the importance of floating point (FP) performance in numerous domains, several new variants of FP and its alternatives have been proposed (e.g., Bfloat16, TensorFloat32, and posits). These representations do not have correctly rounded math libraries. Further, the use of existing FP libraries for these new representations can produce incorrect results. This paper proposes a novel approach for generating polynomial approximations that can be used to implement correctly rounded math libraries. Existing methods generate polynomials that approximate the real value of an elementary function 𝑓 (𝑥) and produce wrong results due to approximation errors and rounding errors in the implementation. In contrast, our approach generates polynomials that approximate the correctly rounded value of 𝑓 (𝑥) (i.e., the value of 𝑓 (𝑥) rounded to the target representation). It provides more margin to identify efficient polynomials that produce correctly rounded results for all inputs. We frame the problem of generating efficient polynomials that produce correctly rounded results as a linear programming problem. Using our approach, we have developed correctly rounded, yet faster, implementations of elementary functions for multiple target representations.
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 papers9
- Parallel shadow execution to accelerate the debugging of numerical errorsSangeeta Chowdhary, Santosh NagarakatteFSE 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
- Fast shadow execution for debugging numerical errors using error free transformationsSangeeta Chowdhary, Santosh NagarakatteOOPSLA 2022 · 13 citations
- Progressive polynomial approximations for fast correctly rounded math librariesMridul Aanjaneya, Jay P. Lim, Santosh NagarakattePLDI 2022 · 9 citations
Builds on3
- Detecting floating-point errors via atomic conditionsDaming Zou, Muhan Zeng, Yingfei Xiong, Zhoulai Fu et al.POPL 2020 · 45 citations
- Learning compositional functions via multiplicative weight updatesJeremy Bernstein, Jiawei Zhao, Markus Meister, Ming-Yu Liu et al.NeurIPS 2020 · 37 citations
- Debugging and detecting numerical errors in computation with positsSangeeta Chowdhary, Jay P. Lim, Santosh NagarakattePLDI 2020 · 26 citations
Related papers
- Correctly Rounded Math Libraries without Worrying about the Application's Rounding ModeSehyeok Park, Justin Kim, Santosh NagarakattePLDI 2025 · 1 citation
- FPVM: Towards a Floating Point Virtual MachinePeter A. Dinda, Nick Wanninger, Jiacheng Ma, Alex Bernat et al.HPDC 2022 · 4 citations
- High-Performance Branch-Free Algorithms for Extended-Precision Floating-Point ArithmeticDavid Kai Zhang, Alex AikenSC 2025 · 3 citations
- Alternative Implementations of Secure Real NumbersVassil S. Dimitrov, Liisi Kerik, Toomas Krips, Jaak Randmets et al.CCS 2016 · 26 citations
- Maximum Consensus Floating Point Solutions for Infeasible Low-Dimensional Linear Programs with Convex Hull as the Intermediate RepresentationMridul Aanjaneya, Santosh NagarakattePLDI 2024 · 1 citation
