Talk:Subtractive generator: Difference between revisions

Line 24:
:::: No no, 21 is used for shuffling state array during init, while 24 is used for generating random numbers, they are not the same number. --[[User:Ledrug|Ledrug]] 20:02, 2 August 2011 (UTC)
::::: Ok... but I do not see why 21 is being introduced. Ok, sure, 21 and 55 are relatively prime and so are (55-21=34) and 55. But the same holds 24 and 55 and (55-24=31) and 55. This would not be such a big thing, but this seems to be being explained as a general concept as opposed to a cookbook technique where only the listed values are appropriate. --[[User:Rdm|Rdm]] 22:13, 2 August 2011 (UTC)
:::::: Shuffling the state array doesn't seem to be necessary. It's probably like the 165 extra generations, done to minimize the influence of the initial seed. If so, it's probably better to use a number totally unrelated to the step used in generation (24) while not too big or too small to avoid possible correlations. I'd guess instead of 21, 19/17/29 etc probably would be fine too, though 2 would be more questionable. Just a guess. --[[User:Ledrug|Ledrug]] 23:27, 2 August 2011 (UTC)
Anonymous user