gforth
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gforth] 1. (vol60, i4) Re: how to build a really working random see


From: James Gere
Subject: Re: [gforth] 1. (vol60, i4) Re: how to build a really working random seed ? (Marcel) (James Gere)
Date: Tue, 8 Aug 2017 22:05:03 -0400

     Dear Marcel,
                             maybe that last was too terse.
     The point is, verifying the rnd function returns all non-zero numbers, is of linear order ( or less).  I take it you checked the period of the (rnd)->(rnd)' function and found it to be, 2^32-1, for a non-zero value.  This and 0->0 are enough to prove that (rnd)->(rnd)' is 1-to-1.  (rnd)->(rnd)' is of the form: 
          (rnd)' = G( F( (rnd) ) )
.  The form of the take-off function, rnd, is:
          rnd = F( (rnd) ) 
.  As long as F() is 1-to-1, all values of (rnd) will also eventually be 
 returned by  rnd.  So, you need only check that the period of F()-iterated is 2^32-1 for a nonzero argument.
     Sincerely,
                       James Gere

reply via email to

[Prev in Thread] Current Thread [Next in Thread]