comp.lang.ada
 help / color / mirror / Atom feed
From: Hugo Pfoertner <hugo.pfoertner@talknet.de>
Subject: Re: basic random number generating methods
Date: Fri, 07 Sep 2001 23:02:29 +0200
Date: 2001-09-07T23:02:29+02:00	[thread overview]
Message-ID: <3B9935E5.FDFD5A44@talknet.de> (raw)
In-Reply-To: 5ee5b646.0109071057.5d19b56c@posting.google.com

For those being curious I have extracted the source code of the floating
point and discrete RNGs from the GPL licensed GNAT Ada 3.12p
distribution, packed them into a zip file and put it at
http://www.enginemonitoring.org/random/adarand.zip
I suppose it is unchanged in the newer versions 3.13p, 3.14..
"Translation to your awful language is left as an exercise for
the reader!" (citation Lynn Killingbeck) is therefore not necessary. It
might be useful to compare the GNAT Ada implementations with some of the
C hacks.
BTW, does anybody know if G.Marsaglia's full testsuite DIEHARD has been
applied to the GNAT Ada RNG's?
Thanks,
Hugo Pfoertner

Robert Dewar schrieb:
> 
> "sachi" <sachi@beer.com> wrote in message news:<Z6Sl7.12146$592.1048488@news2-win.server.ntlworld.com>...
> 
> > I am using ADA 95 random number generator which is a LCG, the numbers being
> > generated are then taken modulo of so as to get the desired range. However
> > they aint very random..
> 
> I can't believe that your Ada 95 compiler is so broken
> as to use an LCG for the random number generation, since
> this clearly would not meet the requirements of the Ada
> standard. What compiler are you using? What random number
> routine? What exactly do you mean by "ain't very random".
> Certainly you cannot be using the standard Ada library
> routine in GNAT, since most certainly this is not an LCG.



  parent reply	other threads:[~2001-09-07 21:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Z6Sl7.12146$592.1048488@news2-win.server.ntlworld.com>
2001-09-07 10:30 ` basic random number generating methods HP
     [not found] ` <5ee5b646.0109071057.5d19b56c@posting.google.com>
2001-09-07 21:02   ` Hugo Pfoertner [this message]
     [not found] ` <3B99A61A.7E8E@pointecom.net>
2001-09-08  9:04   ` Hugo Pfoertner
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox