Path: utzoo!mnetor!uunet!husc6!ut-sally!utastro!bill From: bill@utastro.UUCP (William H. Jefferys) Newsgroups: comp.sys.mac Subject: Re: Misuse of random number generators Message-ID: <2344@utastro.UUCP> Date: 31 Dec 87 21:56:42 GMT References: <2337@utastro.UUCP> <6418@jade.BERKELEY.EDU> <2343@utastro.UUCP> Reply-To: bill@astro.UUCP (William H. Jefferys) Organization: UT AUSTIN Astronomy Department/McDonald Observatory Lines: 15 Keywords: random numbers, multiplicative congruential generators In article <6418@jade.BERKELEY.EDU> jmm@thoth8.berkeley.edu.BERKELEY.EDU () writes: ~If this is true, what's the best way to get random numbers in the range ~1..6? (I'm using LSPascal.) ~ I forgot to mention, you need to be sure that the calculation is done in real arithmetic so you don't have integer divides. Also, if you need integer results (i.e., you are simulating a die, which would be likely given the above question) just make sure you have the right interval and truncate the result. Be careful about the end points, though. Bill Jefferys -- Glend. I can call spirits from the vasty deep. Hot. Why, so can I, or so can any man; But will they come when you do call for them? -- Henry IV Pt. I, III, i, 53