Smatchcube's website 🌍

Exercise 1.24

Here is the change needed to use the fast-prime? instead of the prime? procedure.

Here are the results with our previous primes.

We can see that testing a number roughly ten times greater doesn’t exactly increase the time to a constant so the order of growth is not logarithminc. Maybe it growths faster because the random procedure takes more time with big numbers.