Post Reply 
(11C) Random Prime Number Generator
10-22-2018, 04:10 AM
Post: #18
RE: (11C) Random Prime Number Generator
(10-21-2018 09:09 PM)Dieter Wrote:  According to the 15C manual the random number is 0 ≤ r < 1, so it may also be zero. And since the numbers have ten significant digits, the largest possible value is 0,99999 99999.

The parameters of this PRNG are chosen such that the period is maximal:

(11-06-2014 12:06 AM)Thomas Klemm Wrote:  These numbers fulfill the three requirements of the Hull-Dobell Theorem:
  1. c = 1017980433 and m = 10000000000 are relatively prime
  2. a - 1 = 1574352260 is divisible by all prime factors of m = 10000000000: 2 and 5
  3. a - 1 = 1574352260 = 4*393588065 is a multiple of 4 if m = 10000000000 is a multiple of 4.

Thus we can conclude to have maximal period.

Otherwise we couldn't be sure that each possible value is eventually hit.

Cheers
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(11C) Random Prime Number Generator - Gamo - 10-20-2018, 01:08 PM
RE: (11C) Random Prime Number Generator - Thomas Klemm - 10-22-2018 04:10 AM



User(s) browsing this thread: 1 Guest(s)