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

An approach to generate correctly rounded math libraries for new floating point variants
复制标题

DOI:
10.1145/3434310
复制
发表时间:
2021-01
影响因子:
--
通讯作者:
Jay P. Lim;Mridul Aanjaneya;John L. Gustafson;Santosh Nagarakatte
Jay P. Lim;Mridul Aanjaneya;John L. Gustafson;Santosh Nagarakatte
中科院分区:
--
文献类型:
--
作者:
Jay P. Lim;Mridul Aanjaneya;John L. Gustafson;Santosh Nagarakatte

文献摘要

相似文献

考虑到浮点(FP)性能在许多领域中的重要性,已经提出了FP及其替代品的几个新变体(例如,BFloat16、TensorFloat32和Poits)。这些表示法没有正确四舍五入的数学库。此外,为这些新的表示使用现有的FP库可能会产生不正确的结果。本文提出了一种生成多项式近似的新方法,该方法可用于实现正确的四舍五入数学库。现有方法生成的多项式近似于初等函数的实值(𝑓(𝑥),并且由于实现中的逼近误差和舍入误差而产生错误结果。相反,我们的方法生成的多项式近似于𝑓(𝑥的正确舍入值(即,𝑓(𝑥的值)舍入到目标表示)。它提供了更多的余量来识别有效的多项式,从而为所有输入产生正确的舍入结果。我们将生成能产生正确舍入结果的高效多项式的问题框架化为线性规划问题。使用我们的方法,我们已经为多个目标表示正确地四舍五入地开发了基本函数的实现,但速度更快。
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.