leeeeee wrote:
Quote:
Anyone attempting to generate random numbers by deterministic means is, of course, living in a state of sin." - John Von Neumann
There is no such thing as a deterministic random number generator, any aparent randomness is caused purely by the limits of your perception. Someday, somewhere, whatever you write will fail some randomness test.
every body knows that

Quote:
The reason I used the PRNG generator I did was it fulfilled my two most pressing needs at the time, it's fast - about 40x faster than the standard method, and it's spectrally flat with a reasonable cycle time.
hmm, what's the standard method?
Quote:
I'm planning on sticking with the 32bit shift type PRNG but probably with 15 or 17 shifts and a scatter array. This costs in speed and size but experiments so far are encouraging.
I understand this to mean that you're going to run through 15 or 17 cycles of the
LFSR each time the RND function is called and then combine the result with some random
constants (maybe XOR the result with a number from an array of random numbers, indexed
by the lower four bits of the result, or something like that)
working on that assumption..
First, the problem with using an LFSR with only 32 bits is that each value occurs only
once per cycle, so it's more like playing with a shuffled deck of cards (with the problem of
card counting) than it is like rolling dice. Of course, if you never expect to use anything
near the full 32 bits, it can appear more like rolling dice. But sounds like your going to
go to some pains to make sure things are shuffled up reasonably well.
You can achieve some of that just by using a more "complex" polynomial.
Using every nth value from the LFSR should shuffle things up some but it
won't increase the cycle length and using every 15th or 17th will decrease the cycle length
and throw away most of your possible values (2^32-1, the maximal cycle length for
a 32 bit LFSR, is divisible by both 15 and 17)
For about the same cost as another cycle or two of a single LFSR you could run another LFSR
combine them and both shuffle things up some more and increase the cycle length
I'm not trying to talk you into anything, I'm just pointing out that you can probably get
better effect for less cost than what you're going to do (if I understand that correctly)
I'd be curious how you derive and apply your scatter array, if you'd care to
elucidate