Implementation and Synthesis of Math Library Functions
Ian Briggs, Yash Lad, Pavel Panchekha
摘要
Achieving speed and accuracy for math library functions like exp , sin , and log is difficult. This is because low-level implementation languages like C do not help math library developers catch mathematical errors, build implementations incrementally, or separate high-level and low-level decision making. This ultimately puts development of such functions out of reach for all but the most experienced experts. To address this, we introduce MegaLibm, a domain-specific language for implementing, testing, and tuning math library implementations. MegaLibm is safe, modular, and tunable. Implementations in MegaLibm can automatically detect mathematical mistakes like sign flips via semantic wellformedness checks, and components like range reductions can be implemented in a modular, composable way, simplifying implementations. Once the high-level algorithm is done, tuning parameters like working precisions and evaluation schemes can be adjusted through orthogonal tuning parameters to achieve the desired speed and accuracy. MegaLibm also enables math library developers to work interactively, compiling, testing, and tuning their implementations and invoking tools like Sollya and type-directed synthesis to complete components and synthesize entire implementations. MegaLibm can express 8 state-of-the-art math library implementations with comparable speed and accuracy to the original C code, and can synthesize 5 variations and 3 from-scratch implementations with minimal guidance.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper5
- Sharpen the Spec, Cut the Code: A Case for Generative File System with SYSSPECQingyuan Liu, Mo Zou, Hengbin Zhang, Dong Du 等FAST 2026 · 被引用 9 次
- Efficient Extraction for Effectful E-graphsOliver Flatt, Anjali Pal, Yihong Zhang, Ryan Tjoa 等OOPSLA 2026 · 被引用 1 次
- Target-Aware Implementation of Real ExpressionsBrett Saiki, Jackson Brough, Jonas Regehr, Jesús Ponce 等ASPLOS 2025 · 被引用 1 次
- Correctly Rounded Math Libraries without Worrying about the Application's Rounding ModeSehyeok Park, Justin Kim, Santosh NagarakattePLDI 2025 · 被引用 1 次
- Random Variate Generation with Formal GuaranteesFeras A. Saad, Wonyeol LeePLDI 2025
它引用的顶会 Paper9
- egg: Fast and extensible equality saturationMax Willsey, Chandrakana Nandi, Yisu Remy Wang, Oliver Flatt 等POPL 2021 · 被引用 170 次
- Scalable yet rigorous floating-point error analysisArnab Das, Ian Briggs, Ganesh Gopalakrishnan, Sriram Krishnamoorthy 等SC 2020 · 被引用 36 次
- Efficient generation of error-inducing floating-point inputs via symbolic executionHui Guo, Cindy Rubio-GonzálezICSE 2020 · 被引用 27 次
- Debugging and detecting numerical errors in computation with positsSangeeta Chowdhary, Jay P. Lim, Santosh NagarakattePLDI 2020 · 被引用 26 次
- An approach to generate correctly rounded math libraries for new floating point variantsJay P. Lim, Mridul Aanjaneya, John L. Gustafson, Santosh NagarakattePOPL 2021 · 被引用 21 次
相关 Paper
- Choosing mathematical function implementations for speed and accuracyIan Briggs, Pavel PanchekhaPLDI 2022 · 被引用 4 次
- High performance correctly rounded math libraries for 32-bit floating point representationsJay P. Lim, Santosh NagarakattePLDI 2021 · 被引用 19 次
- Progressive polynomial approximations for fast correctly rounded math librariesMridul Aanjaneya, Jay P. Lim, Santosh NagarakattePLDI 2022 · 被引用 9 次
- One polynomial approximation to produce correctly rounded results of an elementary function for multiple representations and rounding modesJay P. Lim, Santosh NagarakattePOPL 2022 · 被引用 15 次
- SpEQ: Translation of Sparse Codes using EquivalencesAvery Laird, Bangtian Liu, Nikolaj S. Bjørner, Maryam Mehri DehnaviPLDI 2024 · 被引用 6 次
