in reply to Re: Simple primality testing
in thread Simple primality testing
My original requirements were for primes with 7-8 digits, or more generally, those that can be represented by a long.
testing whether it's a prime and then generating tens and hundreds more until you accidentaly tramp over a prime sounds horribly inefficient to me.
Surprisingly it doesnt take very long at all for my particular task. But you are right it isn't efficient. But efficiency in this particular case is not required at all. If the program takes a few seconds then fine, but as it is it finishes in a heartbeat.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Simple primality testing
by Jenda (Abbot) on Nov 23, 2005 at 14:18 UTC |