Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!gatech!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.brl.mil (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: random numbers in awk? Message-ID: <16154@smoke.brl.mil> Date: 14 May 91 19:58:10 GMT References: <1991Apr24.041134.14519@athena.mit.edu> <1136@mwtech.UUCP> <1991May13.221822.27731@gumby.dsd.TRW.COM> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 11 In article <1991May13.221822.27731@gumby.dsd.TRW.COM> suhre@shark.dsd.trw.com.UUCP (Maurice E. Suhre) writes: -In article <1136@mwtech.UUCP> martin@mwtech.UUCP (Martin Weitzel) writes: -+If you need larger numbers, you can, of course, call random twice, multiply -+the result of the first call by 256, add the result of the second call, and -+take the whole thing modulo the largest number you want. -Be advised that the operations mentioned (multiplication, modulo) will, -in general, change the distribution of the random numbers. That is, if you -started with uniformly distributed random numbers, then what you will -come out with will not be uniformly distributed. Be advised that the procedure Martin suggested does preserve uniformity.