![]() |
| Register | Login | |||||
|
Main
| Memberlist
| Active users
| Calendar
| Chat
| Online users Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album |
|
| | |||
| Acmlm's Board - I3 Archive - - Posts by kingshriek |
| User | Post | ||
|
kingshriek Newcomer Since: 02-13-06 Last post: 6245 days Last view: 6245 days |
| ||
| If you're interested in random number generation, I recommend reading Chapter 7 of Numerical Recipes in C. In 7.4, they say that linear feedback shift register generators (LFSR) are poor random number generators when used as a series of bits interpreted as an integer or floating point number.
If you don't care too much about the quality of the random numbers, then LFSR makes for very fast generation. Many NES games use this technique, e.g. Adventures of Lolo 3 uses 8 bits of a 16-bit LFSR for password generation. Also, letting n (as given in your post) be an arbitrary value is a bad idea. For the most random results (maximal period for the shift register length), the feedback polynomial needs to be a primitive polynomial mod 2. |
|||
|
kingshriek Newcomer Since: 02-13-06 Last post: 6245 days Last view: 6245 days |
| ||
Originally posted by Zoku Legendary Axe <---> Makyou Densetsu Legendary Axe II <---> Ankoku Densetsu |
| Acmlm's Board - I3 Archive - - Posts by kingshriek |