摘要 |
The invention relates to a method for calculating a modulo-operation a mod p, in which a table (1) is used that contains the values n*p for n = 1, 2, Variables a and p are whole positive numbers with a mod p = a-n*p. An integral hypothesis nH is calculated for the unknown value n. Afterwards, the values nH*p and 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 (nH + 1)*p and/or a-(nH - 1)*p are calculated and at least one of these expressions is compared with the value 0 upon, whereupon n is determined. |