arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1912.00867math.NAcs.NAcs.PL
收藏

浮点运算的一种概率方法

A Probabilistic Approach to Floating-Point Arithmetic

Fredrik Dahlqvist, Rocco Salvia, George A Constantinides

摘要:

高精度浮点运算必然会引入舍入误差,传统上使用最坏情况分析来限制舍入误差。然而,最坏情况分析可能过于保守,因为最坏情况错误在实践中可能非常罕见。在这里,我们开发了一个概率模型的舍入误差,它变得有可能估计的可能性,舍入误差的算法位于一个给定的区间内。给定一个输入分布,我们展示了如何计算舍入误差的分布。对于低精度的算术,我们这样做,对于高精度的算术,我们得到一个简单的近似。然后,该模型是完全组合的:给定一个用简单的命令式编程语言编写的数值程序,我们可以递归地计算每一步计算中的舍入误差分布,并将其传播到每个程序指令。这是通过应用最初由Kozen开发的形式主义来形式化概率程序的语义。然后,我们讨论了该模型的实现,并使用它来执行概率范围分析的一些基准。

英文摘要:

Finite-precision floating point arithmetic unavoidably introduces rounding errors which are traditionally bounded using a worst-case analysis. However, worst-case analysis might be overly conservative because worst-case errors can be extremely rare events in practice. Here we develop a probabilistic model of rounding errors with which it becomes possible to estimate the likelihood that the rounding error of an algorithm lies within a given interval. Given an input distribution, we show how to compute the distribution of rounding errors. We do this exactly for low precision arithmetic, for high precision arithmetic we derive a simple approximation. The model is then entirely compositional: given a numerical program written in a simple imperative programming language we can recursively compute the distribution of rounding errors at each step of the computation and propagate it through each program instruction. This is done by applying a formalism originally developed by Kozen to formalize the semantics of probabilistic programs. We then discuss an implementation of the model and use it to perform probabilistic range analyses on some benchmarks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑