random number generator

mcdonald at uxe.cso.uiuc.edu mcdonald at uxe.cso.uiuc.edu
Wed Feb 17 00:58:00 AEST 1988


>Simplistic, but this works:
>Generate about 12 random numbers (assuming 0.0 <= i <1.0)

       ADD THEM TOGETHER

>and divide by 12.  This is sufficiently close to gaussian distribution
>for most purposes.  The more numbers you generate before you do the
>division, the closer you will get to purely gaussian distribution.



More information about the Comp.lang.c mailing list