| ??? 12/19/07 09:15 Read: times |
#148500 - chi squared.... Responding to: ???'s previous message |
... is one of the "measures" of randomness, not a (pseudo)random generator itself.
For pseudorandom generators which fit well into a '51 project, look up LCRNG (linear congruent random number generator), or LFSR (linear feedback shift register). These are by far the most popular. A relatively simple and good way would be to use a cryptographical function ("primitive") such as a block or stream cipher and turn it inot a pRNG. <shameless self-advertisement>A few relatively simple but for most '51-related purposes strong enough block ciphers' implementation can be found on my webpage and/or in the Code Library here.</shameless self-advertisement> It also depends a lot how you "factor" the one-of-50 result out of the stream of numbers a pRNG produces. Tell us more on your project. Is this '51-related? JW |



