摘要 |
A method for calculating a modulo operation a mod p uses a table (1) containing the values n*p for n=1, 2, . . . In this case, a and p are positive integers where a mod p=a-n*p. An integral hypothesis nH is calculated for the unknown value n. Afterwards, the values nH*p and also at least one adjacent value (nH+1)*p and/or (nH-1)*p are looked up in the table (1). The expressions a-nH*p and also a-(nH+1)*p and/or a-(nH-1)*p are calculated and at least one of these expressions is compared with the value 0. n is thereupon determined.
|