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