Exercise 1.24. Modify the timed-prime-test procedure of exercise 1.22 to use fast-prime? (the Fermat method), and test each of the 12 primes you found in that exercise. Since the Fermat test has (log n) growth, how would you expect the time to test primes near 1,000,000 to compare with the time needed to test primes near 1000? Do your data bear this out? Can you explain any discrepancy you find?
对每个数字进行 sqrt(n) 次检测,在 1000000 附近和 1000 附近的时间是 190 与 1 ,与 log(n) 的增加值差别比较大。因为 Fermat 方法只是在计算