Article View: comp.sys.mac
Article #12991Re: Random number Generator wanted.
From: Alexander M. Rosenberg
Date: Thu, 05 Jul 1990 22:14
Date: Thu, 05 Jul 1990 22:14
36 lines
2404 bytes
2404 bytes
In article <1990Jun30.170949.1426@Neon.Stanford.EDU> kaufman@Neon.Stanford.EDU (Marc T. Kaufman) writes: > I thank Sak for this info. I am not sure just which Macs this applies to -- > probably the ci and fx, certainly not the SE. Can someone from Apple tell us > when the algorithm changed, and is it part of a system patch so all Macs can > benefit from it? > > Marc Kaufman (kaufman@Neon.stanford.edu) Sak is incorrect. While he may note that the algorithm is the same (I'm not sure), it is definately not probable for him to have matched up 10000 numbers. Apple's random number generator uses the tick count as a seed upon each InitGraf (I may be wrong here, but I'm sure that it is time derived.) I do know that the mouse driver has always kept track of the time at which a click occurs, and takes the difference in time between that click and the previous one, and adds this number to the current randSeed. This is where an additional level of randomness is provided. (Humans tend to be more "random" than computers do, eh?) This is why you may have seen results that didn't follow a pattern. (It is possible that in 32-bit QuickDraw they changed the algorithm, but I seriously doubt it.) (ignore any paths found here, they are incorrect. I can be reached at Alex_Rosenberg.INTEGRATION@gateway.qm.apple.com) --------------------------------------------------------------------------- - Alexander M. Rosenberg - INTERNET: alexr@ucscb.ucsc.edu - Yoyodyne - - 330 1/2 Waverley St. - UUCP:ucbvax!ucscc!ucscb!alexr - Propulsion - - Palo Alto, CA 94301 - BITNET:alexr%ucscb@ucscc.BITNET- Systems - - (415) 329-8463 - Nobody is my employer so - :-) - - - so nobody cares what I say. - -
Technical Details
Message-ID:
<8999@goofy.Apple.COM>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!ucscb.ucsc.edu!alexrReferences:
<152@asacsg.mh.nl> <1990Jun29.020739.9146@Neon.Stanford.EDU> <1990Jun30.170949.1426@Neon.Stanford.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!usc!apple!ucscb.ucsc.edu!alexr From: alexr@ucscb.ucsc.edu (Alexander M. Rosenberg) Newsgroups: comp.sys.mac,comp.sys.mac.programmer,comp.sys.mac.misc,comp.sys.mac.system Subject: Re: Random number Generator wanted. Message-ID: <8999@goofy.Apple.COM> Date: 5 Jul 90 22:14:02 GMT Sender: usenet@Apple.COM Organization: Hacker's Anonymous Lines: 36 References: <152@asacsg.mh.nl> <1990Jun29.020739.9146@Neon.Stanford.EDU> <1990Jun30.170949.1426@Neon.Stanford.EDU>