As far as I can tell, it is made up of three generators.
The first is seeded by the variable xchg, and I've checked it has full period for all seeds, so you can seed it with any 64bit value.
I'm not familiar with the second, but it is seeded by xs. I assume you can seed it with any value - because there should be an attached warning if you couldn't.
The third is seeded by the for loop on line 28, so you needn't worry about that.
it mentions that the 64-bit version uses 169-bits (64 + 73 + 32?)
so out of the 3 variables left, carry, xcng, and xs, you think I should leave carry and xs alone and just seed xcng?
in the thread above, note:
gmarsaglia wrote:
Note that in these sample listings, the Q array is seeded
by CNG+XS, based on the seed values specified in the
initial declarations. For many simulation studies, the
73 bits needed to seed the initial xcng, xs and carry<a
for the 32-bit version, or 169 bits needed for the 64-bit
version, may be adequate.
But more demanding applications may require a significant
portion of the >1.3 million seed bits that Q requires.
See text and comments from the Nov 3 posting.
edit: also, I assume that every time I call KISS, it's the equivalent of calling rand_sk64(), correct?
I can't figure the 73 (in the 32bit version) or 169 in this one. It may be worth posting on that forum or one of the newsgroups for an explanation. As I said, I don't work on this area any more.
I wouldn't alter index as that is set to force a call to refill on the first invocation of XS.
It is the `a' that is confusing me. I understand a to be 6906969069, but when you then take 64+64+log2(6906969069) you don't get 169.
My background is maths. I have no formal CS training of any kind. My masters thesis was on distribution transforms. That's basically once you've made the effort to get a uniform number from a prng what do you then do if you want a normal/exponential/weibull/etc number.
For the last few years I have been working on a particular type of VRP using metaheuristic approaches.
ok - that last posting is getting me a little bit closer into figuring out how to set this up
the actual seed appears to be all the bits in Q[] (20632 * 64 = 1.3mln) and the initial carry, but if one doesn't need the extra power, one could bootstrap Q[] with xcng and xs as shown on Line 28 - I think the 64 bits George refers to below in xcng and xs is 2 x 32 bit in the 32 bit version.
edit: 1337280 / 64 = 20895 (wonder where this 20895 came from)
gmarsaglia wrote:
"Users should choose a reasonable number of the 1337280
random bits that a fully-seeded Q array requires."
The degree of reasonableness depends on whether the
application is for simulation or for security.
With b=2^32, the SUPR part of this KISS=SUPR+CNG+XS
produces, in reverse order by the CMWC method, the
base-b expansion of the rational number k/p for
the prime p=7010176*b^41490+1, with k determined
by the seed values in Q and the initial carry.
There are repeating cycles of 54767*2^1337279 base-b
"digits" in that expansion---the order of b for the prime p.
If you have a given set of a few thousand "digits" in
that sequence and you want to know precursors or
successors, you are pretty much stuck if the initial
Q array was fully seeded---there are so many places
where a particular string can appear that finding a
specific one becomes extremely difficult.
If only, say, 64 bits were used to seed the Q array
by means of CNG+XS, then a particular string may appear
at considerably fewer places in that base-b expansion.
The task of locating a particular location, so as to
get precursors or successors, is reduced but may be feasible.
But any one of the many appearances of that particular
string of base-b digits is likely to serve well as a set
of independent random 32-bit integers---just, as, for example,
strings of bits in the binary expansion of pi are could well
run Las Vegas, if chosen from an unknown random location
among the first 10^400000 places, specified each day.
Thus, for simulation purposes, some 60-100 seed bits seem to
serve very well; for security, more of the 1.3 million
seed bits should chosen---the more, the safer.
Bear in mind the actual generator is CNG + XS + SUPR. The Q array is only used for the calculation of SUPR. So even if you didn't initialize it from CNG and XS, their initial values do play a partin the overall generator.