Possible Duplicate:
Converting a Uniform Distribution to a Normal Distribution
Hello.
I'd like to know of any algorithm implemented in C which can take a random value between 0 and 1, the mean and standard deviation and then return a normally distributed result.
I have too little brainpower to figure this o开发者_JAVA百科ut for myself right now.
I can't find anything useful on the internet.
Thank you.
Box-Muller is the transform you need.
There's already been the suggestion for Box Muller, but a computationally simpler approach is simply to take advantage of the central-limit theorem; add enough independent random variables together, and the result will approximate a normal distribution.
精彩评论