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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,c637b36a7fc5f587 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s21.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Randomness tests References: <398c0d14-6c77-44cc-b5f3-428f94102152@s31g2000yqs.googlegroups.com> In-Reply-To: <398c0d14-6c77-44cc-b5f3-428f94102152@s31g2000yqs.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 173.16.158.68 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s21 1247780497 173.16.158.68 (Thu, 16 Jul 2009 21:41:37 GMT) NNTP-Posting-Date: Thu, 16 Jul 2009 21:41:37 GMT Organization: AT&T ASP.att.net Date: Thu, 16 Jul 2009 21:41:37 GMT Xref: g2news2.google.com comp.lang.ada:7092 Date: 2009-07-16T21:41:37+00:00 List-Id: Gautier write-only wrote: > Does someone have some randomness checking sources in Ada ? > I am evaluating a fast random generator (published long time ago in > the Ada letters), alternative to GNAT's implementation. > Probably the most obvious test is to check that it is well uniformly > distributed. An interesting test is the "parking-lot" test. Consecutive pairs of numbers from the generator are treated as (x, y) pairs of coordinates and plotted on a graph. Poor generators create line segments; good ones don't. (The test gets its name from the 1st generator it was applied to, which created short, parallel, diagonal line segments that reminded people of the lines in a parking lot.) Apparently even generators that do well on other tests can fail this one. The generator in Turbo Pascal did especially poorly on this test. I know of one application in which consecutive triples of numbers were treated as (x, y, z) 3-D coordinates. A generator which did well on other tests, including the 2-D parking lot test, failed the 3-D version. Also note that the PragmAda reusable components include the "universal" random number generator, which is supposed to be a very good generator, is portable, and gives identical results on all platforms. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35