News for hackers. Stuff that matters.
Re:Busy Simulator: Feign importance with repeating app sounds by jtolmar on Wednesday December 15, 2021 @01:34PM (#29569841)
If I recall correctly, this will get you a standard deviation of 1.

  let result = 0;
  for (let i = 0; i < 6; i++) {
    result += Math.random() - Math.random();
  }
  return result;
Obviously this costs 12x as much as Math.random() itself, but it sure is simple.

(It'll also never return anything more than 6 standard deviations away from the mean, but it's not like you actually want that in most applications.)

There are no comments on this comment yet.