Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithm for generating normally distributed random values in C? [duplicate]

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 out for myself right now.

I can't find anything useful on the internet.

Thank you.

like image 979
Matthew Mitchell Avatar asked Dec 31 '25 09:12

Matthew Mitchell


1 Answers

Box-Muller is the transform you need.

like image 191
Doug Currie Avatar answered Jan 02 '26 00:01

Doug Currie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!