|
![](/i/fill.gif) |
Tim Glover <tgl### [at] nettally com> wrote:
: Most random number generators produce uniform-distributed
: random numbers, not normally -distributed random numbers.
: There's an old programmer's trick (at least as old as
: FORTRAN 4) to approximate normal distributions from uniform
: ones.... take TWO uniform randoms of half the range and add
: them together to get final value!
Actually this will not give a normal distribution. If you want a normal
distribution you have to add at least three random numbers or more.
--
main(i){char*_="BdsyFBThhHFBThhHFRz]NFTITQF|DJIFHQhhF";while(i=
*_++)for(;i>1;printf("%s",i-70?i&1?"[]":" ":(i=0,"\n")),i/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |