We provide tools to help automate the error analysis of algorithms that evaluate simple functions over the floating-point numbers. The aim is to obtain tight relative error bounds for these algorithms, expressed as a function of the unit round-off. Due to the discrete nature of the set of floating-point numbers, the largest errors are often intrinsically "arithmetic" in the sense that their appearance may depend on specific bit patterns in the binary representations of intermediate variables, which may be present only for some precisions. We focus on generic (i.e., parameterized by the precision) and analytic over-estimations that still capture the correlations between the errors made at each step of the algorithms. Using methods from computer algebra, which we adapt to the particular structure of the polynomial systems that encode the errors, we obtain bounds with a linear term in the unit round-off that is sharp in manycases. An explicit quadratic bound is given, rather than the $O()$-estimate that is more common in this area. This is particularly important when using low precision formats, which are increasingly common in modern processors. Using this approach, we compare five algorithms for computing the hypotenuse function, ranging from elementary to quite challenging.
翻译:我们提供工具帮助自动化评估浮点数上简单函数算法的误差分析。目标是获得这些算法的紧致相对误差界,表示为舍入单位(unit round-off)的函数。由于浮点数集合的离散性质,最大误差往往本质上是"算术性的",即其出现可能取决于中间变量二进制表示中的特定比特模式,而这些模式可能仅在特定精度下存在。我们关注通用的(即通过精度参数化的)且能捕捉算法每一步中误差相关性的解析性过估计。通过运用计算机代数方法(我们针对编码误差的多项式系统的特定结构进行了适配),我们获得了在许多情况下舍入单位线性项为紧致的误差界。我们给出了显式的二次界,而非该领域更常见的$O()$估计。这对于现代处理器中日益普遍的低精度格式尤为重要。通过这种方法,我们比较了五种计算斜边函数的算法,从基础到相当具有挑战性的情形。