Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Answer: How do I get random numbers that follow standard distribution?

by polettix (Vicar)
on Mar 24, 2005 at 17:38 UTC ( [id://442131]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://442131]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-19 07:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found