More pseudo random number generators for calculators

07132020, 03:00 PM
Post: #10




RE: More pseudo random number generators for calculators
The generator I posted was the result of a 5minute search. I'm going to find one for some computations but getting "better" (however measured) takes more time.
I use long LCGs for Monte Carlo (whenever my quasiMonte Carlo stuff doesn't apply) as the precision does matter. I have a short generator on the calculator (or I did, it's easy to redesign) with three shift registers lengths 15,16,17, combined with a 16bit GCD. The total cycle is (2^151)*(2^161)*(2^171)*2^16 (the cycle lengths are prime) giving just under 2^64 as a cycle. However, the precision is only 15 bits. A true 64bit RNG would have a precision of 64 bits. A problem arises in simulating exponential or Gaussian distributions by the BoxMuller method. With fifteen bits, the greatest exponential number is ln(2^16) or about 11 whereas with 64 bits one gets ln(2^64) or 44. With the Gaussian, the largest number generated is about Sqrt(2*Ln(2^16)) or a sigma of 4.7. Not even 6sigma quality. With 64 bits one gets Sqrt(2*Ln(2^64)) or 9.4. The smaller precision does not explore rare events. In real life, one should use a rareevent generator. 

« Next Oldest  Next Newest »

Messages In This Thread 
More pseudo random number generators for calculators  Namir  07082020, 02:19 PM
RE: More pseudo random number generators for calculators  ErikM  07082020, 07:51 PM
RE: More pseudo random number generators for calculators  ttw  07092020, 03:45 AM
RE: More pseudo random number generators for calculators  Namir  07102020, 11:25 PM
RE: More pseudo random number generators for calculators  Namir  07152020, 06:12 AM
RE: More pseudo random number generators for calculators  Albert Chan  07092020, 11:19 AM
RE: More pseudo random number generators for calculators  Namir  07092020, 07:35 PM
RE: More pseudo random number generators for calculators  Gene  07092020, 09:15 PM
RE: More pseudo random number generators for calculators  Namir  07092020, 09:45 PM
RE: More pseudo random number generators for calculators  ttw  07092020, 01:42 PM
RE: More pseudo random number generators for calculators  ttw  07132020 03:00 PM

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