Talk:Miller–Rabin primality test: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 22: | Line 22: | ||
large sizes, the primes found are correct but too many correct primes are not found. The following modifications |
large sizes, the primes found are correct but too many correct primes are not found. The following modifications |
||
are helpful: an integer power function, power/2, will replace floating point power function, math:pow/2; in function |
are helpful: an integer power function, power/2, will replace floating point power function, math:pow/2; in function |
||
mr_series/4 math:pow/2 is replaced by power:power/2; in function pow_mod/3, the same replacement is made |
mr_series/4, math:pow/2 is replaced by power:power/2; in function pow_mod/3, the same replacement is made |
||
and truncations are eliminated, also the expression E/2 is replaced by E div 2. |
and truncations are eliminated, also the expression E/2 is replaced by E div 2. |
||