comp.lang.ada
 help / color / mirror / Atom feed
From: xanthian@well.com (Kent Paul Dolan)
Subject: Re: Gnat Chat, Random Numbers in GNAT
Date: 2000/01/26
Date: 2000-01-26T00:00:00+00:00	[thread overview]
Message-ID: <sYyj4.804$dw3.37978@news.wenet.net> (raw)
In-Reply-To: 388C6DE0.73DDD6BE@earthlink.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4158 bytes --]

Jeff Carter  <jrcarter@acm.org> wrote:
>"Gisle S�lensminde" wrote:

>> In article <SLSi4.702$dw3.34085@news.wenet.net>, Kent Paul Dolan wrote:
>> >I want to do some genetic algorithm (GA) programming in GNAT, to do
>> >proof of concept for some new approaches I've been mulling to speed up
>> >convergence and remove the need for sorts, and I need to know about the
>> >kind and quality of the Ada.Numerics.Float_Random implementation in
>> >GNAT, to decide whether I can trust it to work well in a statistical
>> >distribution sense when called (probably) hundreds of millions of times
>> >in a single program run (you may guess that I have abundant cpu cycles
>> >at work, and you'd be correct, at least 15 machines behind our firewall
>> >sit mostly idle for good reason that my using them for week long low
>> >priority GA runs wouldn't impact significantly).

>> >Header excerpts from the source, from someone who knows right where to
>> >look, so I don't have to slog through it from a zero knowledge starting
>> >point, would be a perfectly fine answer, if the info is there.  Formal
>> >pseudorandom number generator test reports of whatever style have
>> >become popular since I was last doing that kind of quality control
>> >personally back in the sixties would be good.  Anecdotal personal
>> >experience is also welcome as an answer.  URLs pointing to any of the
>> >non-source code information would be equally useful.

>> >Thanks for any help.  I read and archive this newsgroup daily, so an
>> >email response is welcome, but not necessary.

>> In the gnat runtime library sources I found the following comment
>> in bot the float_random and discrete_random packages, on how they
>> are implemented.

>> --  Note: the implementation used in this package was contributed by
>> --  Robert Eachus. It is based on the work of L. Blum, M. Blum, and
>> --  M. Shub, SIAM Journal of Computing, Vol 15. No 2, May 1986. The
>> --  particular choices for P and Q chosen here guarantee a period of
>> --  562,085,314,430,582 (about 2**49), and the generated sequence has
>> --  excellent randomness properties. For further details, see the
>> --  paper "Fast Generation of Trustworthy Random Numbers", by Robert
>> --  Eachus, which describes both the algorithm and the efficient
>> --  implementation approach used here. This paper is available at
>> --  the Ada Core Technologies web site (http://www.gnat.com).

Thanks Gisel!  That is more than good enough for my modest needs.

>The sources of Ada.Numerics.Float_Random for GNAT are in a-nuflra.ad?

>If you have GNAT, you can examine the implementation for yourself.

I have gnat, and can easily bring it down again from the FreeBSD
/usr/ports mechanisms with a few keystrokes, but now there's no need.
On my stingy hard drive, by choice, the sources disappeared with the
object modules when I cleaned up after building gnat.

>FWIW (personal experience anecdote), I did a parking-lot test of both
>Float_Random and Marsaglia's Universal Random-Number algorithm and no
>structure was apparent in either.

Thanks for that reassurance, too, Jeff.

>I can provide you with Ada source for the Marsaglia generator if you
>have tests you'd like to run on it.

Thanks, Jeff.  No, as I said earlier, my 1962-era random number generator
testing experience is pretty useless today, and I'm more than willing to
go ahead on the advice of others.  I've just been burned a dozen or more
times by RNGs delivered as part of compilers and interpreters that were
of very low quality, so I wanted to see if someone else had "tried" before
I "buyed"(sic).  I don't have any reason to distrust the gnat implementation,
I just needed some help to trust it; I'm happy to hear that Dr. Dewar and
the rest of the ACT troups have done their usual professional job.

               ===== random archival quality quote =====

"...Roxanne  falls  in  love  with  Christian,  a  cavileer  in Cyrano's
regiment who hasn't got the brains god gave an eclair..."
                                                      -- reviewer on NPR

--
Kent Paul Dolan.
<xanthian@well.com> <xanthian@aztec.asu.edu> <xanthian@whistle.com>





  reply	other threads:[~2000-01-26  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-24  0:00 Gnat Chat, Random Numbers in GNAT Kent Paul Dolan
2000-01-24  0:00 ` Ehud Lamm
2000-01-24  0:00 ` Keith Thompson
2000-01-24  0:00 ` Gisle S�lensminde
2000-01-24  0:00   ` Jeff Carter
2000-01-26  0:00     ` Kent Paul Dolan [this message]
2000-01-26  0:00       ` Jean-Pierre Rosen
2000-01-24  0:00 ` Ted Dennison
2000-01-25  0:00 ` Nick Roberts
2000-02-05  0:00 ` Robert Dewar
2000-02-06  0:00 ` Ashley Deas Eachus
2000-02-05  0:00   ` Keith Thompson
2000-02-06  0:00     ` Robert Iredell Eachus
2000-02-07  0:00       ` Kent Paul Dolan
2000-02-09  0:00         ` Robert Iredell Eachus
2000-02-06  0:00   ` Kent Paul Dolan
2000-02-06  0:00     ` Robert Iredell Eachus
  -- strict thread matches above, loose matches on Subject: below --
2000-01-26  0:00 Christoph Grein
replies disabled

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