aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src
diff options
context:
space:
mode:
authorGuilherme Andrade <[email protected]>2017-03-18 19:48:23 +0000
committerGuilherme Andrade <[email protected]>2017-04-20 21:30:53 +0100
commitdff85f3d6fdb4b3453d863bf9208073564a9fcf2 (patch)
tree57bd88d6776d40a89ae975e7f3cb569d783c2154 /lib/stdlib/doc/src
parent2cc47f22e4cb775422a6a7fb1b94836e7cf51143 (diff)
downloadotp-dff85f3d6fdb4b3453d863bf9208073564a9fcf2.tar.gz
otp-dff85f3d6fdb4b3453d863bf9208073564a9fcf2.tar.bz2
otp-dff85f3d6fdb4b3453d863bf9208073564a9fcf2.zip
rand: Support arbitrary normal distributions
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r--lib/stdlib/doc/src/rand.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/stdlib/doc/src/rand.xml b/lib/stdlib/doc/src/rand.xml
index 8745e16908..3a5d18dc35 100644
--- a/lib/stdlib/doc/src/rand.xml
+++ b/lib/stdlib/doc/src/rand.xml
@@ -119,6 +119,11 @@ S0 = rand:seed_s(exsplus),
<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>This random number generator is not cryptographically
strong. If a strong cryptographic random number generator is
@@ -201,6 +206,15 @@ S0 = rand:seed_s(exsplus),
</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>
@@ -211,6 +225,15 @@ S0 = rand:seed_s(exsplus),
</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>