Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!henry!hairston From: hairston@henry.ece.cmu.edu (David Hairston) Newsgroups: comp.sys.mac.programmer Subject: Re: Is Random() random? Message-ID: Date: 5 Dec 90 06:11:18 GMT References: <31359.275BAB9A@stjhmc.fidonet.org> <47094@apple.Apple.COM> Organization: Gaia II Lines: 25 In-reply-to: lins@Apple.COM's message of 4 Dec 90 21:57:05 GMT [hairston@henry.ece.cmu.edu writes:] [] how random is the Toolbox routine Random()? IM-I says it returns [] an integer in the range -32767 (not -32768) to 32,767 before [] cycling. does this mean it will hit every number in that range [] once before repeating? and why the seemingly strange range [Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) writes:] [] It definately won't hit every number once before repeating. [lins@Apple.COM (Chuck Lins) writes:] [] And if it did hit every number in the range before repeating it wouldn't be [] random. hmmm, we're getting picky here. "pseudo-random" is okay. i'd like a generator that uniformly and pseudo-randomly hits every number in its range once before repeating and it would be better of i could specify the range as a parameter or seed. it seems random number generators can have properties that are optimized to different tastes. i've read UMPG and i'll have to read it again 'cause it seemed a little uncertain on this point altho it did suggest a formula and a couple of references. thanx to all who responded! -dave- hairston@henry.ece.cmu.edu