English

An Improved Integer Modular Multiplicative Inverse (modulo $2^w$)

Data Structures and Algorithms 2022-04-26 v2

Abstract

This paper presents an algorithm for the integer multiplicative inverse (mod 2w2^w) which completes in the fewest cycles known for modern microprocessors, when using the native bit width ww for the modulus 2w2^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 2k2^k with kk = 1, 2, 3, 4, or 5, providing the first proof of the preferred formula with kk=4 or 5.

Keywords

Cite

@article{arxiv.2204.04342,
  title  = {An Improved Integer Modular Multiplicative Inverse (modulo $2^w$)},
  author = {Jeffrey Hurchalla},
  journal= {arXiv preprint arXiv:2204.04342},
  year   = {2022}
}
R2 v1 2026-06-24T10:42:58.540Z