Slice sampling: Difference between revisions

Content deleted Content added
OAbot (talk | contribs)
m Open access bot: hdl, doi added to citation with #oabot.
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 114:
An implementation in the [[Macsyma]] language is:
 
<sourcesyntaxhighlight lang="smalltalk">
slice(x) := block([y, alpha],
y:random(exp(-x^2 / 2.0) / sqrt(2.0 * dfloat(%pi))),
Line 120:
x:signum(random()) * random(alpha)
);
</syntaxhighlight>
</source>
 
==See also==