Pseudo-random number generator

前端 未结 10 736
无人及你
无人及你 2020-12-09 05:17

What is the best way to create the best pseudo-random number generator? (any language works)

10条回答
  •  离开以前
    2020-12-09 05:37

    The German magazine C't tested a number of software and hardware generators in the 2/2009 issue and ran the results through various statistical tests.

    I scanned the results here.

    I would not bother writing my own. The article mentions that even Donald Knuth failed with his "Super-random number generator", which was not so random after all. Get one that passed all tests (had a result > 0 in all columns). They also tested a setup with a VIA EPIA M10000 mobo, which has a hardware RNG. I like this option for a commercial or semi-commercial setup that requires a robust random number server with high throughput.

    Unless, of course, you are just playing around, in which case this may be good enough.

提交回复
热议问题