Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!bionet!hayes.fai.alaska.edu!acad3.fai.alaska.edu!ftpam1 From: ftpam1@acad3.fai.alaska.edu (MUNTS PHILLIP A) Newsgroups: comp.lang.pascal Subject: Re: help on random number generator & t Summary: Beware of random number generators Message-ID: <1990Jul25.044307.25240@hayes.fai.alaska.edu> Date: 25 Jul 90 04:43:07 GMT References: <23899@adm.BRL.MIL> <13000011@uxh.cso.uiuc.edu> <1157@manta.NOSC.MIL> Sender: usenet@hayes.fai.alaska.edu (J Random USENET) Reply-To: ftpam1@acad3.fai.alaska.edu Organization: University of Alaska Fairbanks Lines: 37 News-Software: VAX/VMS VNEWS 1.3-4 In article <1157@manta.NOSC.MIL>, north@manta.NOSC.MIL (Mark H. North) writes... > > > >In the first place I wouldn't trust Press, et al since I found them to be >quite confused concerning deconvolution -- perhaps they are not so confused >in other areas, I don't know. > >Secondly, I wouldn't trust any canned 'random number generator' without >testing. They usually aren't documented very well so you don't know what According to whoever wrote the article I referenced in the October 1988 "Communications of the ACM" (I only copied the pages with program listings), testing should be for correctness rather than randomness. In other words, they claim the algorithm is provably random and all you need to do is make sure the implementation is correct. All I can say is that it works for me. The article specifically mentions Turbo 3.0 so Borland may have indeed done better in 5.5. Again, the myths and legends concering seeds arises from overflow in the internal calculations, which are averted in the unit I posted before. The author(s) give a test program fragment for validating an implementation of their generator: seed := 1; for n := 1 to 10000 do u := random(seed); writeln(seed); The resultant value must be 1043618065. The article has a theory section wherein claims about the generator are proved(?) but I didn't copy it. They also speculated about other values of a and m but weren't ready to make any claims about them. Philip Munts N7AHL NRA Extremist, etc. University of Alaska, Fairbanks