When I read the pcg paper it was not clear to me whether the sequence number, referred to as increment by O'Neill, had an upper limit of < 2^63 or < 2^64 so I played it safe by using < 2^63; effectively halving the number of sequences from 2^64 to 2^63.
O'Neill's blog, last entry 20 August 2017, fleshes out some aspects of pcg and it appears that the upper limit is, in fact, < 2^64. There is a restriction in that the sequence number must be odd. This is ensured by 'this.seq Or 1' in the code. If this.seq is odd the 'this.seq Or 1' is redundant. If this.seq is even then 'this.seq Or 1' makes it odd. Disallowing even numbered, halves, obviously, the total number of sequences that we can use. So, my statement about a key length of 127 bits per round is still true.
In the Sub pcg32.MyRandomize there are two instances of Get64Bit\2. They can now be changed to Get64Bit. We now have 0 <= seq <= 2^64 - 1. In use seq will be >= 1 by virtue of 'this.seq Or 1'.
Strictly speaking when I refer to different sequences - I should be referring to different streams.
All that my miss-reading did was to put an earlier block on how many steams we could use.
By the way the blog is a good read - that is where I found out that O'Neill is heavily into using PractRand now.
General FreeBASIC programming questions.
Who is online
Users browsing this forum: No registered users and 2 guests