Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!convex!convex.COM From: dodson@convex.COM (Dave Dodson) Newsgroups: comp.lang.fortran Subject: Re: Random Number Functions--Generate versus Input Message-ID: <108690@convex.convex.com> Date: 13 Nov 90 22:11:04 GMT References: <1990Nov8.170334.24579@athena.mit.edu> <1990Nov8.215752.7075@athena.mit.edu> <108474@convex.convex.com> <1990Nov13.053812.19914@athena.mit.edu> Sender: news@convex.com Reply-To: dodson@convex.COM (Dave Dodson) Organization: Convex Computer Corporation; Richardson, TX Lines: 17 In article <1990Nov13.053812.19914@athena.mit.edu> oliver@athena.mit.edu (James D. Oliver III) writes: >Your algorithm is the same as the original scheme proposed by von Neumann >for generating random vectors. It's efficiency is given by the area of a >unit cube divided by a unit sphere, so 18/pi=5.73 random numbers plus a >square root must be generated for each vector, as opposed to the 2.55 plus >a square root for the Marsaglia method I posted in a recent follow-up The intended contribution in my posting was how to vectorize the generation of random unit vectors. I suggest you combine Marsaglia's rejection algorithm with my use of whenfle to produce a bunch of unit vectors in vector mode. With the entire process vectorized, I would expect it to be much faster to generate them than to input them. ---------------------------------------------------------------------- Dave Dodson dodson@convex.COM Convex Computer Corporation Richardson, Texas (214) 497-4234