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 Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- High performance correctly rounded math libraries for 32-bit floating point representations cites Detecting floating-point errors via atomic conditions
- High performance correctly rounded math libraries for 32-bit floating point representations cites Debugging and detecting numerical errors in computation with posits
- Progressive polynomial approximations for fast correctly rounded math libraries cites High performance correctly rounded math libraries for 32-bit floating point representations
- Progressive polynomial approximations for fast correctly rounded math libraries cites One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modes
- Parallel shadow execution to accelerate the debugging of numerical errors cites High performance correctly rounded math libraries for 32-bit floating point representations
- Parallel shadow execution to accelerate the debugging of numerical errors cites Detecting floating-point errors via atomic conditions
- Parallel shadow execution to accelerate the debugging of numerical errors cites Debugging and detecting numerical errors in computation with posits
- One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modes cites High performance correctly rounded math libraries for 32-bit floating point representations
- One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modes cites Detecting floating-point errors via atomic conditions
- Fast shadow execution for debugging numerical errors using error free transformations cites High performance correctly rounded math libraries for 32-bit floating point representations
- Fast shadow execution for debugging numerical errors using error free transformations cites Progressive polynomial approximations for fast correctly rounded math libraries
- Fast shadow execution for debugging numerical errors using error free transformations cites Parallel shadow execution to accelerate the debugging of numerical errors
- Fast shadow execution for debugging numerical errors using error free transformations cites One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modes
- Fast shadow execution for debugging numerical errors using error free transformations cites Detecting floating-point errors via atomic conditions
- Fast shadow execution for debugging numerical errors using error free transformations cites Debugging and detecting numerical errors in computation with posits
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
- 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
