June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,18 @@
function hist(numbers)
maxwidth = 50
h = fill(0, 10)
for n in numbers
h[ceil(Int, 10n)] += 1
end
mx = maximum(h)
for (n, i) in enumerate(h)
@printf("%3.1f: %s\n", n / 10, "+" ^ floor(Int, i / mx * maxwidth))
end
end
for i in 1:6
n = rand(10 ^ i)
println("\n##\n## $(10 ^ i) numbers")
@printf("μ: %8.6f; σ: %8.6f\n", mean(n), std(n))
hist(n)
end