[comp.lang.pascal] Random Number Generation

douglas@reed.UUCP (P Douglas Reeder) (03/12/88)

You can easily write your own, if you like, with the following equations:

seed := (seed*a + c) mod m
random := seed/m

One good set of numbers to use is: a=62605,c=113218009,m=536870912
A good first seed is 7774755.


--
Doug Reeder            USENET: ...!tektronix!reed!douglas
Box 502 Reed College   BITNET: douglas@reed.UUCP
3203 S.E. Woodstock      ARPA: !tektronix!reed!douglas@Berkley
Portland, OR 97202   UNIVERSE: Local Group,Milky Way,Sol III,122 38'W 45 28'N

-- 
Doug Reeder            USENET: ...!tektronix!reed!douglas
Box 502 Reed College   BITNET: douglas@reed.UUCP
3203 S.E. Woodstock      ARPA: !tektronix!reed!douglas@Berkley
Portland, OR 97202   UNIVERSE: Local Group,Milky Way,Sol III,122 38'W 45 28'N