Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » sci.math.* » sci.math.independent

Topic: How to test a pseudo random prime number generator?
Replies: 17   Last Post: Sep 4, 2007 5:47 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ben Rudiak-Gould

Posts: 210
Registered: 2/2/05
Re: How to test a pseudo random prime number generator?
Posted: Aug 19, 2007 6:05 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

quasi wrote:
> rossum <rossum48@coldmail.com> wrote:
>> repeat
>> n <- random(lo, hi)
>> until IsPrime(n)

>
> Yes, but it's not uniformly random on the set of primes in the range
> lo .. hi. See my recent replies.


Yes it is. There's no reason for it to prefer any prime in the range over
any other. It doesn't use nextprime().

-- Ben



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.