MillerRandomTest This is the intermediate step that repeats within the miller rabin primality test for better probabilitic chances of receiving the correct result with random witnesses.
(num int64)
| 76 | // miller rabin primality test for better probabilitic chances of |
| 77 | // receiving the correct result with random witnesses. |
| 78 | func MillerRandomTest(num int64) (bool, error) { |
| 79 | random := rand.Int63n(num-2) + 2 |
| 80 | return MillerTest(num, random) |
| 81 | } |
| 82 | |
| 83 | // MillerTestMultiple is like MillerTest but runs the test for multiple |
| 84 | // witnesses. |
no test coverage detected