Statistics/Normal distribution: Difference between revisions
m
→{{header|Wren}}: Minor tidy
(Added solution for EDSAC) |
m (→{{header|Wren}}: Minor tidy) |
||
(One intermediate revision by one other user not shown) | |||
Line 2,269:
{{works with|PARI/GP|2.4.3 and above}}
<syntaxhighlight lang="parigp">rnormal()={
my(u1=random(1.),u2=random(1.));
sqrt(-2*log(u1))*cos(2*Pi*
\\ Could easily be extended with a second normal at very little cost.
};
Line 3,987:
{{libheader|Wren-fmt}}
{{libheader|Wren-math}}
<syntaxhighlight lang="
import "./fmt" for Fmt
import "./math" for Nums
var rgen = Random.new()
|