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

推广快速倒数平方根算法

Generalising the Fast Reciprocal Square Root Algorithm

Mike Day

AI总结:

本文将快速倒数平方根算法推广至所有有理数次幂并支持任意多项式次数的精化步骤,在无限浮点精度假设下自动构造可证明最优常数,证明首一精化多项式在成本与精度权衡上更具优势,并给出多个新的最佳近似。

摘要:

快速倒数平方根算法是一种成熟的近似技术,包含两个阶段:首先,通过使用整数指令操作浮点参数的位模式来获得粗略近似;其次,通过一个或多个步骤对粗略结果进行精化,传统上使用牛顿迭代,或者使用其他作者发现的带有精心选择的数值常数的改进表达式。该算法在微处理器具备计算倒数平方根的内置硬件支持之前被广泛使用。然而,在撰写本文时,通常没有用于计算其他固定分数次幂的硬件加速。本文将该算法推广以适用于所有有理数次幂,并支持精化步骤中的任意多项式次数,在无限浮点精度的假设下,提供了一种在所有这些情况下自动构造可证明最优常数的程序。此外,本文还表明,在某些假设下,使用首一精化多项式产生的结果在成本/精度权衡方面比使用一般多项式获得的结果要好得多。还分析了进一步的扩展,并给出了几个新的最佳近似。

英文摘要:

The Fast Reciprocal Square Root Algorithm is a well-established approximation technique consisting of two stages: first, a coarse approximation is obtained by manipulating the bit pattern of the floating point argument using integer instructions, and second, the coarse result is refined through one or more steps, traditionally using Newtonian iteration but alternatively using improved expressions with carefully chosen numerical constants found by other authors. The algorithm was widely used before microprocessors carried built-in hardware support for computing reciprocal square roots. At the time of writing, however, there is in general no hardware acceleration for computing other fixed fractional powers. This paper generalises the algorithm to cater to all rational powers, and to support any polynomial degree(s) in the refinement step(s), and under the assumption of unlimited floating point precision provides a procedure which automatically constructs provably optimal constants in all of these cases. It is also shown that, under certain assumptions, the use of monic refinement polynomials yields results which are much better placed with respect to the cost/accuracy tradeoff than those obtained using general polynomials. Further extensions are also analysed, and several new best approximations are given.

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

↑