Talk:Subtractive generator: Difference between revisions

task desc wrong
(→‎So... what am I doing wrong?: is the example correct?)
(task desc wrong)
Line 40:
say "";
for (1 .. 10) { say scalar(@state), ": ", subrand(); }</lang> gave me different answers. --[[User:Ledrug|Ledrug]] 17:32, 2 August 2011 (UTC)
:EDIT I looked at Bentley's C code, and the task description is incorrect. After step 4, the sequence r0 ... r54 needs to be reversed. Bentley's code performs step 3 forward, but generates rand numbers by iterating the r array backward. --[[User:Ledrug|Ledrug]] 17:51, 2 August 2011 (UTC)
Anonymous user