Normal distribution random number generator -- WANTED
VanZandt
jrv at sdimax2.mitre.org
Wed Dec 12 00:38:03 AEST 1990
In article <86482 at tut.cis.ohio-state.edu> Brian Adkins <adkins at cis.ohio-state.edu> writes:
>>I am looking for C source code to generate normal distribution
>>random numbers.
>
>I'm not sure if this is exactly what you want, but the Box-Muller method
>takes a pair of independent uniform variables ("regular random numbers")
^^^^^^^^^^^
>and creates a pair of standard normal variables:
>...
If the two variables you start with are correlated, the resulting numbers
won't have a normal distribution. Make sure you have a good RNG if you use
this method, or maybe discard a few numbers between the two you use.
- Jim Van Zandt
More information about the Comp.lang.c
mailing list