Xref: utzoo comp.sys.mac:55886 comp.sys.mac.programmer:15666 comp.sys.mac.misc:931 comp.sys.mac.system:673 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!samsung!uunet!psivax!quad1!ttidca!davidd From: davidd@ttidca.TTI.COM (David Dantowitz) Newsgroups: comp.sys.mac,comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system Subject: Re: Random number Generator wanted. Keywords: Random number Message-ID: <18200@ttidca.TTI.COM> Date: 29 Jun 90 19:26:24 GMT References: <152@asacsg.mh.nl> <1990Jun29.020739.9146@Neon.Stanford.EDU> Organization: Citicorp/TTI, Santa Monica Lines: 15 Be quite careful how you splice together random numbers to form larger random numbers. Linear-conguential random number generators (of the form: seed = seed*a mod m + b) have more "random" high order bits than low order bits. Appending two 16 bit numbers may skew your application in a way that's difficult to measure. If you want a 32 bit random number then check out Knuth for some multipliers (a) and modulos (m) that will give you "good" random numbers. Sorry I don't have it handy. -- David Dantowitz Singing Barbershop when not computing