arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.10819math.NAcs.NA

浮点求和中停滞现象的分析与检测

Analysis and Detection of Stagnation in Floating-Point Summation

Mantas Mikaitis, William Woolfenden

首次发表
浏览论文内容

中文总结 AI 辅助

本文首次严格定义浮点求和的停滞现象,在MATLAB和Julia中构建检测工具,应用于多类场景,可帮助用户定位停滞区域并采取优化措施以提升浮点运算精度。

中文摘要 AI 辅助

浮点数求和中的停滞现象指,尽管加数大于零,但运行和(即累加器)的值不发生变化。本文定义了不同类型的停滞——通常称为淹没或吸收,即加法中的一个操作数在浮点求和中被近似或完全舍掉——并提出了在使用浮点运算的数值代码中检测该现象的算法。虽然已有研究探讨了浮点运算中的抵消,例如Lam等人在《动态浮点抵消检测》中的工作,但停滞现象尚未被用作检测和报告浮点运算中精度损失的属性。我们已在MATLAB和Julia两种语言中构建了动态停滞检测工具原型,并将其应用于从向量基本求和、矩阵乘法到流体流动模拟模型等各类应用。借助该工具,用户可识别其浮点代码中发生停滞的区域,在这些代码区域中,可能需要切换到更高精度的数字格式、应用随机舍入,或使用不同的求和算法(如补偿求和)。据我们所知,本文首次对浮点求和中的停滞现象给出了严格定义。

英文摘要

Stagnation in the summation of floating-point numbers occurs when the running sum, or the accumulator, does not change its value despite addends being greater than zero. Here we define different types of stagnation - commonly referred to as swamping or absorption, where one operand in an addition is nearly or completely rounded off---in floating-point summation, and propose algorithms for detecting it in numerical code that uses floating-point arithmetic. Whilst cancellation in floating-point arithmetic has been studied, for example by Lam et al. in `Dynamic floating point cancellation detection', stagnation has not been exploited as a property for detecting and reporting accuracy loss in floating-point operations. We have built prototype dynamic stagnation detection tools in two languages, MATLAB and Julia, and applied them to applications ranging from basic summation of a vector, to matrix multiplication, to a fluid flow simulation model. With this tool, users are able to identify areas of their floating-point code where stagnation occurs - in those areas of the code one may need to switch to a higher precision number format, apply stochastic rounding, or use different summation algorithms such as compensated summation. To the best of our knowledge we provide a first rigorous definition of stagnation in floating-point summation.

发表机构

  • School of Computer Science, University of Leeds(利兹大学计算机科学学院)

机构由 AI 辅助整理,请以论文原文为准。

补充信息

↑