Random numbers: Difference between revisions

add RPL
(add RPL)
Line 2,432:
next i
</syntaxhighlight>
 
=={{header|RPL}}==
≪ RAND LN NEG 2 * √
RAND 2 * π * COS *
→NUM 2 / 1 +
≫ '<span style="color:blue>RANDN</span>' STO
≪ CL∑
1 1000 '''START''' <span style="color:blue>RANDN</span> ∑+ '''NEXT'''
MEAN PSDEV
≫ '<span style="color:blue>TASK</span>' STO
{{out}}
<pre>
1: .990779804949
2: .487204045227
</pre>
The collection is stored in a predefined array named <code>∑DAT</code>, which is automatically created/updated when using the <code>∑+</code> instruction and remains available until the user decides to purge it, typically by calling the <code>CL∑</code> command.
 
=={{header|Ruby}}==
1,151

edits