From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,c76113b004e50a06 X-Google-Attributes: gid103376,public From: Jeff Carter Subject: Re: Gnat Chat, Random Numbers in GNAT Date: 2000/01/24 Message-ID: <388C6DE0.73DDD6BE@earthlink.net>#1/1 X-Deja-AN: 576984636 Content-Transfer-Encoding: 8bit References: X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-ELN-Date: Mon Jan 24 09:21:44 2000 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 948734504 63.11.141.117 (Mon, 24 Jan 2000 09:21:44 PST) Organization: EarthLink Network, Inc. MIME-Version: 1.0 Reply-To: jrcarter@acm.org NNTP-Posting-Date: Mon, 24 Jan 2000 09:21:44 PST Newsgroups: comp.lang.ada Date: 2000-01-24T00:00:00+00:00 List-Id: "Gisle S�lensminde" wrote: > > In article , 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). 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. 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. I can provide you with Ada source for the Marsaglia generator if you have tests you'd like to run on it. -- Jeff Carter "Monsieur Arthur King, who has the brain of a duck, you know." Monty Python & the Holy Grail