HPCE / hpce-2016-cw5

0 stars 2 forks source link

Question about the magic number in step() at random walk puzzle #4

Closed DominicCYK closed 7 years ago

DominicCYK commented 7 years ago

In the reference execution function for random walk puzzle, the step function inside has hard coded two constant number 1664525 and 1013904223. Can someone please explain their meaning and their relationship with the original Mersenne Twister series? Thanks!

m8pple commented 7 years ago

I won't comment too much on this, as the goal is to be able to accelerate things even without necessarily understanding exactly what it does. Of course, understanding helps, but in this instance you can just see it as part of the specification.

If anyone else wants to chime in, then feel free.

jeremych1000 commented 7 years ago

Seems like a easily implementable and relatively fast RNG generator?

m8pple commented 7 years ago

Closing as I think everyone has seen it.