A guide to simulation (2nd ed.)
A guide to simulation (2nd ed.)
Proceedings on Advances in cryptology---CRYPTO '86
Division by invariant integers using multiplication
PLDI '94 Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
Comparison of three modular reduction functions
CRYPTO '93 Proceedings of the 13th annual international cryptology conference on Advances in cryptology
The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
Coding the Lehmer pseudo-random number generator
Communications of the ACM
Comparing Mathematical Provers
MKM '03 Proceedings of the Second International Conference on Mathematical Knowledge Management
Python in a Nutshell (In a Nutshell (O'Reilly))
Python in a Nutshell (In a Nutshell (O'Reilly))
A pseudo-random number generator for the System/360
IBM Systems Journal
Hi-index | 0.00 |
On w-bit processors which are much faster at multiplying two w-bit integers than at dividing 2w-bit integers by w-bit integers, reductions of large integers by moduli M smaller than 2w-1 are often implemented suboptimally, leading applications to take excessive processing time. We present a modular reduction algorithm implementing division by a modulus through multiplication by a reciprocal of that modulus, a well-known method for moduli larger than 2w-1. We show that application of this method to smaller moduli makes it possible to express certain modular sums and differences without having to compensate for word overflows. By embedding the algorithm in a loop and applying a few transformations to the loop, we obtain an algorithm for reduction of large integers by moduli up to 2w-1. Implementations of this algorithm can run considerably faster than implementations of similar algorithms that allow for moduli up to 2w. This is substantiated by measurements on processors with relatively fast multiplication instructions. It is notoriously hard to specify efficient mathematical algorithms on the level of abstract machine instructions in an error-free manner. In order to eliminate the chance of errors as much as possible, we have created formal correctness proofs of our algorithms, checked by a mechanized proof assistant.