Post Reply 
New Appoach for Random Number Generation???
03-21-2019, 11:52 PM
Post: #7
RE: New Appoach for Random Number Generation???
(03-21-2019 07:17 PM)Albert Chan Wrote:  With seed = 0.123, I created million "random" bytes = int(256*(x = rand34(x)))

Test the bytes with ent.exe, it failed the Chi-Square test.
Quote: If the percentage is greater than 99% or less than 1%, the sequence is almost certainly not random.

Entropy = 7.999695 bits per byte.

Optimum compression would reduce the size
of this 1000000 byte file by 0 percent.

Chi square distribution for 1000000 samples is 422.05, and randomly
would exceed this value less than 0.01 percent of the times.

Arithmetic mean value of data bytes is 127.3923 (127.5 = random).
Monte Carlo value for Pi is 3.140892564 (error 0.02 percent).
Serial correlation coefficient is 0.000456 (totally uncorrelated = 0.0).

BTW, rand34() *crashed* with seed of 0.0, due to log10() domain error.

I updated the SUB go in the first message to handle zero random numbers.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: New Appoach for Random Number Generation??? - Namir - 03-21-2019 11:52 PM



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