当前位置: X-MOL 学术arXiv.cs.MS › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A Novel Approach to Generate Correctly Rounded Math Libraries for New Floating Point Representations
arXiv - CS - Mathematical Software Pub Date : 2020-07-09 , DOI: arxiv-2007.05344
Jay P. Lim and Mridul Aanjaneya and John Gustafson and Santosh Nagarakatte

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 methodology for generating polynomial approximations that can be used to implement correctly rounded math libraries. Existing methods produce polynomials that approximate the real value of an elementary function $f(x)$ and experience wrong results due to errors in the approximation and due to rounding errors in the implementation. In contrast, our approach generates polynomials that approximate the correctly rounded value of $f(x)$ (i.e., the value of $f(x)$ rounded to the target representation). This methodology 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. Our approach guarantees that we produce the correct result even with range reduction techniques. Using our approach, we have developed correctly rounded, yet faster, implementations of elementary functions for multiple target representations. Our Bfloat16 library is 2.3$\times$ faster than the corresponding state-of-the-art while producing correct results for all inputs.

中文翻译:

一种为新的浮点表示生成正确舍入数学库的新方法

鉴于浮点(FP)性能在众多领域中的重要性,已经提出了几种新的 FP 变体及其替代方案(例如,Bfloat16、TensorFloat32 和 Posits)。这些表示没有正确舍入的数学库。此外,将现有的 FP 库用于这些新表示可能会产生不正确的结果。本文提出了一种生成多项式近似的新方法,可用于实现正确舍入的数学库。现有方法产生的多项式近似于初等函数 $f(x)$ 的实际值,并且由于近似误差和实现中的舍入误差而产生错误结果。相比之下,我们的方法生成的多项式近似于 $f(x)$ 的正确舍入值(即,$f(x)$ 的值四舍五入到目标表示)。这种方法提供了更多的余量来识别为所有输入产生正确舍入结果的有效多项式。我们将生成正确舍入结果的有效多项式的问题构建为线性规划问题。我们的方法保证即使使用范围缩减技术也能产生正确的结果。使用我们的方法,我们已经为多个目标表示开发了正确舍入但速度更快的基本函数实现。我们的 Bfloat16 库比相应的最新技术快 2.3$\times$,同时为所有输入生成正确的结果。我们将生成正确舍入结果的有效多项式的问题构建为线性规划问题。我们的方法保证即使使用范围缩减技术也能产生正确的结果。使用我们的方法,我们已经为多个目标表示开发了正确舍入但速度更快的基本函数实现。我们的 Bfloat16 库比相应的最新技术快 2.3$\times$,同时为所有输入生成正确的结果。我们将生成正确舍入结果的有效多项式的问题构建为线性规划问题。我们的方法保证即使使用范围缩减技术也能产生正确的结果。使用我们的方法,我们已经为多个目标表示开发了正确舍入但速度更快的基本函数实现。我们的 Bfloat16 库比相应的最新技术快 2.3$\times$,同时为所有输入生成正确的结果。多目标表示的基本函数的实现。我们的 Bfloat16 库比相应的最新技术快 2.3$\times$,同时为所有输入生成正确的结果。多目标表示的基本函数的实现。我们的 Bfloat16 库比相应的最新技术快 2.3$\times$,同时为所有输入生成正确的结果。
更新日期:2020-10-13
down
wechat
bug