Affiliation:
1. University of Washington, USA
Abstract
Scientific and engineering applications depend on floating point arithmetic to approximate real arithmetic. This approximation introduces rounding error, which can accumulate to produce unacceptable results. While the numerical methods literature provides techniques to mitigate rounding error, applying these techniques requires manually rearranging expressions and understanding the finer details of floating point arithmetic. We introduce Herbie, a tool which automatically discovers the rewrites experts perform to improve accuracy. Herbie's heuristic search estimates and localizes rounding error using sampled points (rather than static error analysis), applies a database of rules to generate improvements, takes series expansions, and combines improvements for different input regions. We evaluated Herbie on examples from a classic numerical methods textbook, and found that Herbie was able to improve accuracy on each example, some by up to 60 bits, while imposing a median performance overhead of 40%. Colleagues in machine learning have used Herbie to significantly improve the results of a clustering algorithm, and a mathematical library has accepted two patches generated using Herbie.
Funder
National Science Foundation
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
41 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Equality Saturation Theory Exploration à la Carte;Proceedings of the ACM on Programming Languages;2023-10-16
2. A dynamic program analysis-based method for floating-point program precision loss detection;International Conference on Computer Network Security and Software Engineering (CNSSE 2023);2023-06-26
3. Combining E-Graphs with Abstract Interpretation;Proceedings of the 12th ACM SIGPLAN International Workshop on the State Of the Art in Program Analysis;2023-06-06
4. Better Together: Unifying Datalog and Equality Saturation;Proceedings of the ACM on Programming Languages;2023-06-06
5. babble: Learning Better Abstractions with E-Graphs and Anti-unification;Proceedings of the ACM on Programming Languages;2023-01-09