in reply to Re: How do I get random numbers that follow standard distribution?
in thread How do I get random numbers that follow standard distribution?

I do support the previous answer: the code should include the test for $w being zero, otherwise you risk a division by zero in the very next line.

The proposed solution roots in Numerical Recipes in C, chapter 7, section 2; probably it' better to update the Perl Cookbook and the answer in Q&A as well.

Flavio

Don't fool yourself.
  • Comment on Re: Answer: How do I get random numbers that follow standard distribution?
  • Download Code