Benford's law: Difference between revisions

m
m (Automated syntax highlighting fixup (second round - minor fixes))
Line 3,039:
(formerly Perl 6)
{{Works with|rakudo|2016-10-24}}
<syntaxhighlight lang="raku" line">sub benford(@a) { bag +« @a».substr(0,1) }
 
sub show(%distribution) {
Line 3,077:
8: 5.16% | 5.12% | 0.05%
9: 1.88% | 4.58% | 2.70%</pre>
 
=={{header|REXX}}==
The REXX language (for the most part) hasn't any high math functions, so the &nbsp; '''e''', &nbsp; '''ln''', &nbsp; and '''log''' &nbsp; functions were included herein.
10,333

edits