Steven D'Aprano <st...@remove-this-cybersource.com.au> writes: > The Box-Muller transform is reasonably simple, but you can't be serious > that it is simpler than adding twelve random numbers and subtracting six!
If you want a normal distribution, using the Box-Muller transform is simpler because it spares you the complication of figuring out whether the 12-trial binomial approximation is close enough to produce reliable results for your specific application, which you obviously have to do if you are using the approximation for anything serious. It also involves writing less code than that list comprehension, since it is already implemented in the random module so you can just call it directly. -- http://mail.python.org/mailman/listinfo/python-list