Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Mathematical routines Message-ID: <671.UUL1.3#5129@willett.UUCP> Date: 18 Mar 90 00:23:18 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 43 Date: 03-15-90 (22:43) Number: 3033 (Echo) To: HARV Refer#: 3027 From: DOUG SCHIFFER Read: NO Subj: MATHEMATICAL ROUTINES Status: PUBLIC MESSAGE The following comes from the JPL C library. I had a use for this one myself once. I've included it in two parts. The rest of this letter is the credits. The next letter is the source code proper. Sorry to put it in C, but my knowledge of Forth is VERY scanty. Enjoy! /* 1.0 11-12-84 */ /********************************************************************* * Robert C. Tausworthe * * Jet Propulsion Laboratory * * Pasadena, CA 91009 1984 * ********************************************************************* * Normal-Distribution Random Number Generator. * * Computes a sample value from a normal distribution characterized by * zero mean and unit standard deviation. Uses "Box-Muller polar * method" for calculation of normal deviates, * * Box, G. E. P., and Muller, M. E., "A Note on the Generation of * Normal Deviates," ANNALS OF MATH. STAT., Vol. 29, pp. 610-611, * 1958. * * Refined in * * Knuth, D. E., FUNDAMENTAL ALGORITHMS, Vol II, "Seminumerical * Algorithms," Addison-Wesley Pub. Co., page 117. * */ --- * Via ProDoor 3.1R Of COURSE I'm egotistical - and DAMN PROUD of it, too! NET/Mail : Kadet PCB, Camden,NY, (315)245-3815 * MetroLink Regional Hub ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'