diff options
author | Sverker Eriksson <[email protected]> | 2011-03-28 16:38:57 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-03-28 19:08:49 +0200 |
commit | b52a2170d13fe7ff6e4e3b146b63d8f68c2aaadf (patch) | |
tree | 65e17f5ad014584b327ac49dcf47e37f05f87d4b /lib/stdlib/doc/src/random.xml | |
parent | c50f179a15ad8c8bcbc7a71101a9ca23f19f6e8f (diff) | |
download | otp-b52a2170d13fe7ff6e4e3b146b63d8f68c2aaadf.tar.gz otp-b52a2170d13fe7ff6e4e3b146b63d8f68c2aaadf.tar.bz2 otp-b52a2170d13fe7ff6e4e3b146b63d8f68c2aaadf.zip |
Improve algorithm in module random.
Avoid seed values that are even divisors of the primes
and by that prevent getting seeds that are stuck on zero.
Example: random:seed(0,0,0) would produce a series of only zeros.
Diffstat (limited to 'lib/stdlib/doc/src/random.xml')
-rw-r--r-- | lib/stdlib/doc/src/random.xml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml index dcc6d756e1..26f22db48e 100644 --- a/lib/stdlib/doc/src/random.xml +++ b/lib/stdlib/doc/src/random.xml @@ -4,7 +4,7 @@ <erlref> <header> <copyright> - <year>1996</year><year>2009</year> + <year>1996</year><year>2011</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -146,6 +146,11 @@ <c>random_seed</c> to remember the current seed.</p> <p>If a process calls <c>uniform/0</c> or <c>uniform/1</c> without setting a seed first, <c>seed/0</c> is called automatically.</p> + <p>The implementation changed in R15. Upgrading to R15 will break + applications that expect a specific output for a given seed. The output + is still deterministic number series, but different compared to releases + older than R15. The seed <c>{0,0,0}</c> will for example no longer + produce a flawed series of only zeros.</p> </section> </erlref> |