What is some code to generate normally distributed random numbers in ruby?
(Note: I answered my own question, but I\'ll wait a few days before accepting to see if anyone
Another option, this one using the distribution gem, written by one of the SciRuby fellows.
It is a little simpler to use, I think.
require 'distribution' normal = Distribution::Normal.rng(1) norm_distribution = 1_000.times.map {normal.call}