Statistics/Normal distribution: Difference between revisions

m
(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*u1u2)
\\ Could easily be extended with a second normal at very little cost.
};
Line 3,987:
{{libheader|Wren-fmt}}
{{libheader|Wren-math}}
<syntaxhighlight lang="ecmascriptwren">import "random" for Random
import "./fmt" for Fmt
import "./math" for Nums
 
var rgen = Random.new()
9,485

edits