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.0 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT,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: xanthian@well.com (Kent Paul Dolan) Subject: Re: Gnat Chat, Random Numbers in GNAT Date: 2000/01/26 Message-ID: #1/1 X-Deja-AN: 577763782 References: <388C6DE0.73DDD6BE@earthlink.net> X-Complaints-To: news@wenet.net X-Trace: news.wenet.net 948878232 208.178.101.2 (Wed, 26 Jan 2000 01:17:12 PST) Organization: Birthright Party "The birthright of humankind is the stars!" Reply-To: xanthian@well.com (Kent Paul Dolan) NNTP-Posting-Date: Wed, 26 Jan 2000 01:17:12 PST Newsgroups: comp.lang.ada Date: 2000-01-26T00:00:00+00:00 List-Id: Jeff Carter wrote: >"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). 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.