🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #23229

Re: Misuse of random number generators

#23229
From: William H. Jefferys
Date: Thu, 31 Dec 1987 21:56
15 lines
1250 bytes
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
Technical Details
Message-ID: <2344@utastro.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!ut-sally!utastro!bill
References: <2337@utastro.UUCP> <6418@jade.BERKELEY.EDU> <2343@utastro.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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