The quality of numerical computations can be measured through their forward error, for which finding good error bounds is challenging in general. For several algorithms and using stochastic rounding (SR), probabilistic analysis has been shown to be an effective alternative for obtaining tight error bounds. This analysis considers the distribution of errors and evaluates the algorithm's performance on average. Using martingales and the Azuma-Hoeffding inequality, it provides error bounds that are valid with a certain probability and in $\mathcal{O}(\sqrt{n}u)$ instead of deterministic worst-case bounds in $\mathcal{O}(nu)$, where $n$ is the number of operations and $u$ is the unit roundoff.In this paper, we present a general method that automatically constructs a martingale for any computation scheme with multi-linear errors based on additions, subtractions, and multiplications. We apply this generalization to algorithms previously studied with SR, such as pairwise summation and the Horner algorithm, and prove equivalent results. We also analyze a previously unstudied algorithm, Karatsuba polynomial multiplication, which illustrates that the method can handle reused intermediate computations.
翻译:数值计算的质量可通过其前向误差来衡量,而寻找良好的误差界通常具有挑战性。针对多种算法并采用随机舍入(SR)时,概率分析已被证明是获得紧致误差界的有效替代方法。该分析考虑误差的分布,并评估算法的平均性能。通过运用鞅和Azuma-Hoeffding不等式,该方法提供的误差界以特定概率成立,且量级为$\mathcal{O}(\sqrt{n}u)$,而非确定性最坏情况下的$\mathcal{O}(nu)$,其中$n$为运算次数,$u$为单位舍入误差。本文提出一种通用方法,可基于加法、减法和乘法运算,为任何具有多重线性误差的计算方案自动构建鞅。我们将此推广应用于先前已通过SR研究的算法,如成对求和与Horner算法,并证明了等价结果。同时,我们分析了一个先前未经研究的算法——Karatsuba多项式乘法,以此说明该方法能够处理重复使用的中间计算结果。