paperbot · PL 论文追踪

全部论文 待读 收藏

P1 An approach to generate correctly rounded math libraries for new floating point variants

一种为新型浮点变体生成正确舍入数学库的方法
POPL 5(POPL)2021匹配度 5/10 · 论文属于浮点领域,涉及新型浮点格式与正确舍入数学库的自动生成,与用户对浮点方向的兴趣有交集;但核心是多项式逼近与线性规划,不涉及程序静态分析、LLM/Agent 或贝叶斯程序分析,因此匹配度中等。引用 21 inbox
Jay P. Lim, Mridul Aanjaneya, John Gustafson, Santosh Nagarakatte
crossref: 2026-09-10

AI 速览

一句话:提出用线性规划生成多项式逼近正确舍入值,为新型浮点格式自动构建正确舍入数学库。

新型浮点格式(如 Bfloat16、TensorFloat32 和 posit)缺乏正确舍入的数学库,直接复用现有浮点库会产生错误结果。本文提出一种生成多项式逼近的新方法,用于实现正确舍入的数学库。与逼近 f(x) 实值、因逼近误差和实现舍入误差导致错误结果的传统方法不同,本文生成逼近 f(x) 正确舍入值的多项式,从而为寻找对所有输入都产生正确舍入结果的高效多项式提供更大余量。作者将生成此类高效多项式的问题建模为线性规划问题,并针对多种目标表示开发了正确舍入且更快的初等函数实现。

问题
新型浮点变体缺少正确舍入的数学库,现有浮点库直接使用会产生不正确结果。
方法
生成逼近 f(x) 正确舍入值而非实值的多项式,并将其建模为线性规划问题以寻找高效多项式。
评估
针对多种目标浮点表示实现了正确舍入且速度更快的初等函数,验证了方法的有效性。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1192,
  title = {An approach to generate correctly rounded math libraries for new floating point variants},
  author = {Jay P. Lim and Mridul Aanjaneya and John Gustafson and Santosh Nagarakatte},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {POPL},
  year = {2021},
  doi = {10.1145/3434310}
}