arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.06258cs.MScs.NAcs.PLmath.NA
收藏

浮点数调试中的准确余数

Accurate Residues for Floating-Point Debugging

University of Utah(犹他大学)

Yumeng He, Pavel Panchekha

AI总结:

本文提出一种改进方法,通过将余数计算分为两个步骤并优化算法,提高浮点数调试的准确性同时保持效率,减少误报并处理复杂数值问题。

摘要:

浮点运算容易出错且难以理解。浮点数调试器在运行时监控浮点运算并标记数值问题。它们估计余数,即实际浮点值与理想真实值之间的差异,为程序中的每个浮点值。先前工作探索了各种计算这些余数准确且高效的方法。不幸的是,最有效的方法基于“无误差转换”,但误报率高,而最准确的方法基于高精度运算,速度却很慢。本文基于无误差转换方法,旨在提高其准确性同时保持效率。为了更准确地计算余数,本文将余数计算分为两个步骤(舍入误差计算和余数函数评估),并通过改进当前最先进的方法来准确执行每一步。我们在44个大型科学计算工作负载上进行评估,重点是14个先前工具产生误报的基准:我们的方法在10个基准上消除误报,并在剩余3个基准上显著减少误报。此外,复杂数值问题需要额外的注意,因为吸收问题,两个机器精度余数不能在同一执行中同时准确计算。本文引入了余数覆盖,通过多次重新执行程序,计算不同执行中的不同余数,并组装最终的“拼接”执行。我们在169个标准基准上进行评估,这些基准来自数值分析论文和教科书,仅需平均3.6次重新执行。在34个初始运行中有误报的基准中,余数覆盖被触发29个,减少了25个的误报,平均7.1次重新执行。

英文摘要:

Floating-point arithmetic is error-prone and unintuitive. Floating-point debuggers instrument programs to monitor floating-point arithmetic at run time and flag numerical issues. They estimate residues, i.e., the difference between actual floating-point and ideal real values, for every floating-point value in the program. Prior work explores various approaches for computing these residues accurately and efficiently. Unfortunately, the most efficient methods, based on "error-free transformations", have a high rate of false reports, while the most accurate methods, based on high-precision arithmetic, are very slow. This paper builds on error-free-transformations-based approaches and aims to improve their accuracy while preserving efficiency. To more accurately compute residues, this paper divides residue computation into two steps (rounding error computation and residue function evaluation) and shows how to perform each step accurately via careful improvements to the current state of the art. We evaluate on 44 large scientific computing workloads, focusing on the 14 benchmarks where prior tools produce false reports: our approach eliminates false reports on 10 benchmarks and substantially reduces them on the remaining 3 benchmarks. Moreover, complex numerical issues require additional care due to absorption, where two machine-precision residues cannot both be computed accurately in a single execution. This paper introduces residue override, which re-executes the program multiple times, computing different residues in different executions and assembling a final "patchwork" execution. We evaluate on 169 standard benchmarks drawn from numerical analysis papers and textbooks, requiring only 3.6 re-executions on average. Among 34 benchmarks with false reports in the initial run, residue override is triggered on 29 of them and reduces false reports on 25 of them, averaging 7.1 re-executions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑