Talk:Elementary cellular automaton/Random number generator: Difference between revisions

+ C note
(+ C note)
Line 21:
 
::::Thanks Grondilu :-) <br> --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:34, 22 March 2014 (UTC)
 
==C Entry==
Perhaps the C entry is performing some undefined behavour (out-of-bound shifts at run-time, found statically with the D compiler):
<lang C>for (state = i = 0; i < N; i++)
if (rule & B(7 & (st>>(i-1) | st<<(N+1-i))))
</lang>