Mail*Link(r) SMTP RE>Need a random # generator
Note: original was to grassu-list.
There's a good one included in s.perturb, located at:
ftp://pasture.ecn.purdue.edu/pub/mccauley/grass/.
Contact the original author, W. P. Petersen,
<wpp@ips.ethz.ch> for more details.
Here's a blurb from a README file:
README for zufall random number package, C version
------ --- ------ ------ ------ ------- - -------
[NOTE: I have not done extension testing of this port.
use at your own risk. The output of the original
FORTRAN program is in zufall.orig.output. The
original FORTRAN source is at
netlib.att.com:netlib/random/zufall.f.Z --jdm]
This package contains a portable random number generator set
for: uniform (u in [0,1)), normal (<g> = 0, <g^2> = 1), and
Poisson distributions. The basic module, the uniform generator,
uses a lagged Fibonacci series generator:
t = u[n-273] + u[n-607]
u[n] = t - (float) ((int) t)
where each number generated, u[k], is floating point. Since
the numbers are floating point, the left end boundary of the
range contains zero. This package was ported from FORTRAN
to K&R C.
--Darrell
tim glover (tim_glover@abbsmtp.abb.com) writes on 15 December 1995:
Sorry this is a little off subject, but I hope someone can help me...
I need source code or algorithm for a good random number generator.
I'm working in an old FORTRAN compiler that doesn't have an
intrinsic one, and I found out that the one I'm using cycles after
about 9000 numbers. Not good enough!Thanks for any help....
Views expressed above are my own unless otherwise stated
Tim Glover (Tim_Glover@ABBSMTP.abb.com)
ABB Environmental Services
Tallahassee, FL, USA 32301 (904) 656-1293 ext 290
--
Darrell McCauley, PhD; mccauley@mcs.com; http://www.mcs.com/~mccauley/
------------------ RFC822 Header Follows ------------------
Received: by qmgate_backup.anl.gov with SMTP;18 Dec 1995 19:18:21 -0600
Received: (from daemon@localhost) by diego.cecer.army.mil (8.7/8.7) id
PAA16693 for grassu-people; Mon, 18 Dec 1995 15:58:39 -0600 (CST)
Received: from max.cecer.army.mil (max.cecer.army.mil [129.229.20.254]) by
diego.cecer.army.mil (8.7/8.7) with SMTP id PAA16690 for
<grassu-list@diego.cecer.army.mil>; Mon, 18 Dec 1995 15:58:37 -0600 (CST)
Received: from kitten.mcs.com (Kitten.mcs.com [192.160.127.90]) by
max.cecer.army.mil (8.6.9/8.6.9) with ESMTP id PAA08917 for
<grassu-list@max.cecer.army.mil>; Mon, 18 Dec 1995 15:56:32 -0600
Received: from mailbox.mcs.com (Mailbox.mcs.com [192.160.127.87]) by
kitten.mcs.com (8.6.10/8.6.9) with SMTP id PAA02744; Mon, 18 Dec 1995 15:58:27
-0600
Received: by mailbox.mcs.com (/\==/\ Smail3.1.28.1 #28.5)
id <m0tRnZi-000CiTC@mailbox.mcs.com>; Mon, 18 Dec 95 15:58 CST
Received: by mercury.mcs.com (/\==/\ Smail3.1.28.1 #28.5)
id <m0tRnZg-0003ktC@mercury.mcs.com>; Mon, 18 Dec 95 15:58 CST
Message-Id: <m0tRnZg-0003ktC@mercury.mcs.com>
Date: Mon, 18 Dec 95 15:58 CST
From: James Darrell McCauley <mccauley@mcs.com>
Sender: grass-lists-owner@moon.cecer.army.mil
Reply-To: grassu-list@moon.cecer.army.mil
Precedence: Bulk
Sender: grass-lists-owner@moon.cecer.army.mil.
Reply-To: grassu-list@moon.cecer.army.mil.
Precedence: Bulk
To: tim_glover@ABBSMTP.abb.com
CC: grassu-list@max.cecer.army.mil
Subject: Re: Need a random # generator
In-Reply-To: <9511158190.AA819051430@ABBSMTP.ABB.COM>
References: <9511158190.AA819051430@ABBSMTP.ABB.COM>