[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Prime Numbers



At 10:20 -0500 8/17/99, Ken Williams wrote:
>One cannot verify the correctness of a prime number algorithm by comparing its
>results to some known list of primes (though it can sure inspire confidence).
>The only way to verify correctness is to understand the algorithm and show
>that
>it does in fact do the job.

The question wasn't about the correctness of the algorithm.  I specifically
asked whether it produced the correct "first 1000 primes."  That can be
done by comparison against a correct list of the first 1000 primes.  That
was the question because the claim was that the code produced the first
1000 primes.  There was nothing about whether it produces the correct
1001st prime.

(If you demonstrate that the algorithm is correct, then I concede that the
answer to my question is "yes.")

I see people didn't read the smiley I didn't include.  IF the answer is
wrong, THEN for this task it's easy to produce the right answer faster than
this code would.  That's all I meant.

   --John
-- 
John Baxter   jwblist@olympus.net      Port Ludlow, WA, USA

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org