On what algorithm are implementations of Math.rand

2019-06-03 15:14发布

问题:

Does the ECMAscript specification impose a specific pseudo-random generating algorithm?

回答1:

No, it doesn't impose a specific algorithm, it depends on the implementation.

This is an interesting read on the topic: http://baagoe.org/en/w/index.php/Better_random_numbers_for_javascript