comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Source for Random Number Generator
Date: 1997/02/08
Date: 1997-02-08T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.97Feb7195107@spectre.mitre.org> (raw)
In-Reply-To: 19970206153301.KAA04399@ladder01.news.aol.com


In article <19970206153301.KAA04399@ladder01.news.aol.com> johnherro@aol.com writes:

 > The only guarantees are that it IS quick and it IS dirty!  It'll
 > work in Ada 83 as well as Ada 95.  Some mathematicians out there
 > will undoubtedly be able to improve on this:

   With a disclaimer like that from John, I can't be TOO hard on him,
but...this sequence is anything but random.   I can cite dozens of
papers on the problems with LCGs, especially those with short periods
and small multipliers.  If you want to see the problem with this
generator grapically, write a program that graphs the data.  Either
take pairs of numbers and use them as x and y coordinate values or
better plot triples in three dimensions.  Everything will line up in
lines or planes, with large empty spaces in between.

  Some of the other generators that have been posted here are somewhat
better, but only somewhat.  I wouldn't use any of them to choose what
I was going to have for dinner. ;-)

   If anyone wants to get serious about this, I have a set of tests
I'll send them the source of.  But the easiest thing to do is to use
the generator built into GNAT.  I could go into lots of gory details,
but just say that there are lots of tests of randomness it can be
proven will not fail, and there are lots of tests obvious and subtle
that I have run against it.  It works.  Well if you need more than
about 10 million random values per run talk to me.  That is
approaching the point where the theoretical proofs no longer apply,
and is the limit of the testing I have done.
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




  parent reply	other threads:[~1997-02-08  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5d8b95$oec@zeus.orl.mmc.com>
1997-02-07  0:00 ` Source for Random Number Generator Nigel J. Tracey
1997-02-10  0:00   ` Jeff Carter
     [not found] ` <EACHUS.97Feb6161130@spectre.mitre.org>
1997-02-07  0:00   ` Robert I. Eachus
1997-02-10  0:00     ` VADSWorks X-Debugger Michael Levasseur
     [not found] ` <19970206153301.KAA04399@ladder01.news.aol.com>
1997-02-08  0:00   ` Robert I. Eachus [this message]
1997-02-11  0:00     ` Source for Random Number Generator johnherro
replies disabled

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