This paper presents an algorithm for the integer multiplicative inverse (mod $2^w$) which completes in the fewest cycles known for modern microprocessors, when using the native bit width $w$ for the modulus $2^w$. The algorithm is a modification of a method by Dumas, and for computers it slightly increases generality and efficiency. A proof is given, and the algorithm is shown to be closely related to the better known Newton's method algorithm for the inverse. Simple direct formulas, which are needed by this algorithm and by Newton's method, are reviewed and proven for the integer inverse modulo $2^k$ with $k$ = 1, 2, 3, 4, or 5, providing the first proof of the preferred formula with $k$=4 or 5.
翻译:本文介绍了在现代微处理器已知的最少数周期中完成的整数倍倍反(mod $2ww$)的算法。当使用本地比特宽为模模量2w$时,这种算法是杜马对一种方法的修改,对于计算机来说,这种算法略微提高了一般性和效率。提供了证据,并证明算法与更广为人知的牛顿反向方法算法密切相关。本算法和牛顿方法所需要的简单直接公式,被审查和证明是整数反摩杜洛2k$=1、2、3、4或5的整数值2k$=2、3、4或5,提供了首选公式的第一个证据,即4美元或5美元。