aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2017-04-21 15:08:10 +0200
committerRaimo Niskanen <[email protected]>2017-04-21 15:08:10 +0200
commitf214646911cf0cdb3d19d519908d2b06c4a4fff4 (patch)
treeaa90bee48213a5f8952309de8ed59a04a9732f50 /lib/stdlib/doc
parent621cedccc78581330b9628c559b0d851c303564f (diff)
parentdff85f3d6fdb4b3453d863bf9208073564a9fcf2 (diff)
downloadotp-f214646911cf0cdb3d19d519908d2b06c4a4fff4.tar.gz
otp-f214646911cf0cdb3d19d519908d2b06c4a4fff4.tar.bz2
otp-f214646911cf0cdb3d19d519908d2b06c4a4fff4.zip
Merge branch 'rand/arbitrary_normal_distributions'
* rand/arbitrary_normal_distributions: rand: Support arbitrary normal distributions Conflicts: lib/stdlib/test/rand_SUITE.erl
Diffstat (limited to 'lib/stdlib/doc')
-rw-r--r--lib/stdlib/doc/src/rand.xml25
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/stdlib/doc/src/rand.xml b/lib/stdlib/doc/src/rand.xml
index 470dc4da97..e06d7e467d 100644
--- a/lib/stdlib/doc/src/rand.xml
+++ b/lib/stdlib/doc/src/rand.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2015</year><year>2016</year>
+ <year>2015</year><year>2017</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -166,6 +166,11 @@ S0 = rand:seed_s(exrop),
<pre>
{SND0, S2} = rand:normal_s(S1),</pre>
+ <p>Create a normal deviate with mean -3 and variance 0.5:</p>
+
+ <pre>
+{ND0, S3} = rand:normal_s(-3, 0.5, S2),</pre>
+
<note>
<p>The builtin random number generator algorithms are not
cryptographically strong. If a cryptographically strong
@@ -308,6 +313,15 @@ tests. We suggest to use a sign test to extract a random Boolean value.</pre>
</func>
<func>
+ <name name="normal" arity="2"/>
+ <fsummary>Return a normal distributed random float.</fsummary>
+ <desc>
+ <p>Returns a normal N(Mean, Variance) deviate float
+ and updates the state in the process dictionary.</p>
+ </desc>
+ </func>
+
+ <func>
<name name="normal_s" arity="1"/>
<fsummary>Return a standard normal distributed random float.</fsummary>
<desc>
@@ -318,6 +332,15 @@ tests. We suggest to use a sign test to extract a random Boolean value.</pre>
</func>
<func>
+ <name name="normal_s" arity="3"/>
+ <fsummary>Return a normal distributed random float.</fsummary>
+ <desc>
+ <p>Returns, for a specified state, a normal N(Mean, Variance)
+ deviate float and a new state.</p>
+ </desc>
+ </func>
+
+ <func>
<name name="seed" arity="1"/>
<fsummary>Seed random number generator.</fsummary>
<desc>