can anyone tell me if the mersenne twister pseudocode on this page is the same as the code here? if they are not the same, which one is correct?
Asked
Active
Viewed 228 times
1
-
1Have you tried running them both and comparing their outputs? – Mark Byers May 22 '10 at 19:17
-
yeah. they come out differently, even when i get them both to output as decimal/integers – calccrypto May 22 '10 at 19:19
-
How did you run the pseudocode on the wikipedia page? – May 22 '10 at 19:25
-
i changed it to python and ran it. i used 4357 as the seed for both – calccrypto May 22 '10 at 20:07
-
And did you correctly use mod 2 ** 32 arithmetic when you translated it into python? – May 23 '10 at 21:04
-
i think so. i modded where that the wiki pseudocode said 'last 32/31 bits of...' – calccrypto May 23 '10 at 22:26