Merge pull request #834 from maurodibert/patch-36

Update task.md
This commit is contained in:
Ilya Kantor 2019-03-07 13:16:05 +03:00 committed by GitHub
commit 890b57b75b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@ One of them is testing. We may need random data: text, numbers etc, to test thin
In Javascript, we could use `Math.random()`. But if something goes wrong, we'd like to be able to repeat the test, using exactly the same data. In Javascript, we could use `Math.random()`. But if something goes wrong, we'd like to be able to repeat the test, using exactly the same data.
For that, so called "seeded pseudo-random generators" are used. They take a "seed", the first value, and then generate next ones using a formula. So that the same seed yields the same sequence, and hence the whole flow is easily reproducable. We only need to remember the seed to repeat it. For that, so called "seeded pseudo-random generators" are used. They take a "seed", the first value, and then generate next ones using a formula. So that the same seed yields the same sequence, and hence the whole flow is easily reproducible. We only need to remember the seed to repeat it.
An example of such formula, that generates somewhat uniformly distributed values: An example of such formula, that generates somewhat uniformly distributed values: