function modifier(x) { return (x < .5 ? -1 : +1)*(2*(x-.5)) } function random(m) { let random1, random2; while (true) { random1 = Math.random(); random2 = Math.random(); if (random2 < m(random1)) { return random1; } } } const N = 10000; const bins = 20; var numbers = []; for (i=0;i