in reply to Finding Primes
Any two 200 digit primes will do it, but your isa_prime() and gen_primes() subs are way too inefficient to find primes of that size. You are hoping to test primality by exhaustively checking every number less than the candidate as a divisor. That will take more than 10**200 divisions. If you can do one every 10 nanoseconds, that gives you 10**192 seconds, or around 10**175 ages of the universe to check a single number.
Has your math professor given you some reading on the subject of primality testing? If not, check The Prime Pages.Math::Pari is very good for number theory kind of things.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Finding Primes
by sauoq (Abbot) on Aug 14, 2003 at 02:38 UTC | |
by Anonymous Monk on Aug 14, 2003 at 09:36 UTC | |
by sauoq (Abbot) on Aug 14, 2003 at 14:10 UTC | |
by thor (Priest) on Aug 14, 2003 at 12:37 UTC | |
| |
|
Re: Re: Finding Primes
by Tommy (Chaplain) on Aug 14, 2003 at 02:00 UTC |