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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID 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: gisle@spurv.ii.uib.no (Gisle S�lensminde) Subject: Re: Gnat Chat, Random Numbers in GNAT Date: 2000/01/24 Message-ID: #1/1 X-Deja-AN: 576860009 Content-Transfer-Encoding: 8bit References: Organization: University of Bergen, Norway Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-01-24T00:00:00+00:00 List-Id: In article , Kent Paul Dolan wrote: >Aside: >On to my main agenda. > >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). -- Gisle S�lensminde ( gisle@ii.uib.no ) ln -s /dev/null ~/.netscape/cookies