A new modulo computation algorithm

A new modulo computation algorithm

0.00 Avg rating0 Votes
Article ID: iaor19921824
Country: France
Volume: 24
Start Page Number: 307
End Page Number: 313
Publication Date: Mar 1991
Journal: RAIRO Operations Research
Authors: ,
Abstract:

Let X and Y be a couple of integers such that 2n’-1•X•2n-1 and 0•Y•2L-1. A new algorithm which computes rapidly Y mod X is presented. When the algorithm is executed for the first time a constant K (depending on X and L) is computed. This K is saved for future recalls of the procedure with other Y’s smaller than 2L-1. The computation of K requires one division but in later jumps to the procedure only two multiplications, three right-shifts and at most three subtractions will be needed, provided that X remained unchanged. The following note presents the corresponding scheme.

Reviews

Required fields are marked *. Your email address will not be published.