Post Reply 
Information on calculator Random Number Generators from PPC Journal articles
11-15-2016, 07:12 AM (This post was last modified: 11-15-2016 07:40 AM by Dieter.)
Post: #36
RE: Information on calculator Random Number Generators from PPC Journal articles
(11-14-2016 10:22 PM)Paul Dale Wrote:  There are a number of programs available for testing randomness. Knuth is a decent start but there has been a lot more work done over the intervening years.
(...)

Thank you for all these links. Will be a lot to read, but I fear much of this is beyond my scope. #-)

(11-14-2016 10:22 PM)Paul Dale Wrote:  My \( x_{n+1} = frac ( e^{2 x_n + 1} ) \) passes the NIST tests and ent. Dieharder hints at there being a problem with a couple too many weak results and TestU01 fails it outright.

If it's good enough for NIST, why not use it for the 67 Games ROM? It also can handle zero end even negative seeds. And a 41 implementation can be done in one stack level as well:

Code:
LBL "R"
RCL 00
FRC
ST+ X
SIGN
ST+ L
X<> L
e^x
FRC
STO 00
END

The only question is speed – the exponential is not exactly fast. I did a test on V41 set to approx. "hardware speed" and it came out about 15% slower than the pi^3 generator. This is acceptable (compare this to the 9821 generator which is >60% slower). Do you think we may use your RNG for the 67 Games ROM?

Edit: I did a short test and found very high Chi² values. Looking at the number distribution there were several cases where the range 0,2...0,3 had extremely low counts while 0,9+ was very high. Here is an example for 100.000 RNs starting with seed=0,181932:

Code:
0,0...    4091
0,1...   12881
0,2...    1534 (!)
0,3...    9148
0,4...    7835
0,5...   10334
0,6...    9083
0,7...   12908
0,8...   10417
0,9...   21769 (!)

The test was done in Excel VBA with rounding to calculator precision (round 2x+1 to 9 digits, calculate the exponential, round this to 8 resp. 9 digits, return fractional part). Running the test with native 15-digit precision returned less extreme results, but still very high Chi² values (around 300 for n=100.000). What am I doing wrong?

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


Messages In This Thread
RE: Information on calculator Random Number Generators from PPC Journal articles - Dieter - 11-15-2016 07:12 AM



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