A Random Question
06-11-2017, 12:00 AM
Post: #14
 Paul Dale Senior Member Posts: 1,752 Joined: Dec 2013
RE: A Random Question
(06-10-2017 02:28 PM)lrdheat Wrote:  Back in they day with my hp-67 (wish I still had it), I made a primitive random number generator simply by using the 10th through 12th digits of sin (X) where X was in radians, and X incremented up by 1 for each new random number generation.

Taking the middle order digits of $$x_n = frac\left(e^{2 x_{n-1} + 1}\right)$$ starting with $$x_0 = frac\left(\pi\right)$$ produces a fairly well distributed random number, at least in binary. This passes the dieharder tests and only fails a couple of the TestU01 suite. It is a good example of a simple function that appears to produce random output, yet is completely and obviously deterministic. It is also straightforward to show that rounding is not coming into play.

Pauli
 « Next Oldest | Next Newest »

 Messages In This Thread A Random Question - DavidM - 06-09-2017, 03:15 PM RE: A Random Question - pier4r - 06-09-2017, 03:46 PM RE: A Random Question - Paul Dale - 06-09-2017, 11:37 PM RE: A Random Question - Joe Horn - 06-10-2017, 12:03 AM RE: A Random Question - DavidM - 06-10-2017, 01:45 AM RE: A Random Question - pier4r - 06-10-2017, 08:55 AM RE: A Random Question - DavidM - 06-10-2017, 05:10 PM RE: A Random Question - Paul Dale - 06-10-2017, 05:18 AM RE: A Random Question - John Keith - 06-10-2017, 12:57 PM RE: A Random Question - pier4r - 06-10-2017, 01:20 PM RE: A Random Question - DavidM - 06-10-2017, 03:51 PM RE: A Random Question - Paul Dale - 06-10-2017, 11:49 PM RE: A Random Question - DavidM - 06-11-2017, 01:11 AM RE: A Random Question - Paul Dale - 06-11-2017, 05:04 AM RE: A Random Question - lrdheat - 06-10-2017, 02:28 PM RE: A Random Question - Paul Dale - 06-11-2017 12:00 AM RE: A Random Question - ttw - 06-11-2017, 12:21 AM RE: A Random Question - DavidM - 06-11-2017, 01:39 AM RE: A Random Question - Paul Dale - 06-11-2017, 05:19 AM RE: A Random Question - ttw - 06-13-2017, 06:13 AM RE: A Random Question - Paul Dale - 06-11-2017, 12:38 AM