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,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,edb23fd6716e96f5 X-Google-Attributes: gid103376,public X-Google-Thread: 109d8a,3417cfe6445aca2d X-Google-Attributes: gid109d8a,public X-Google-ArrivalTime: 2001-09-07 14:13:35 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!130.133.1.3!fu-berlin.de!newsfeed.tli.de!news.tli.de!not-for-mail Message-ID: <3B9935E5.FDFD5A44@talknet.de> From: Hugo Pfoertner X-Mailer: Mozilla 4.73 [de]C-CCK-MCD QXW0324e (Win95; U) X-Accept-Language: en,de MIME-Version: 1.0 Newsgroups: sci.math,comp.lang.ada Subject: Re: basic random number generating methods References: <5ee5b646.0109071057.5d19b56c@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Fri, 07 Sep 2001 23:02:29 +0200 NNTP-Posting-Host: 195.252.163.130 X-Complaints-To: abuse@tli.de X-Trace: news.tli.de 999896514 195.252.163.130 (Fri, 07 Sep 2001 23:01:54 CEST) NNTP-Posting-Date: Fri, 07 Sep 2001 23:01:54 CEST Organization: Talkline Internet Division http://www.tli.de Xref: archiver1.google.com sci.math:73321 comp.lang.ada:12916 Date: 2001-09-07T23:02:29+02:00 List-Id: For those being curious I have extracted the source code of the floating point and discrete RNGs from the GPL licensed GNAT Ada 3.12p distribution, packed them into a zip file and put it at http://www.enginemonitoring.org/random/adarand.zip I suppose it is unchanged in the newer versions 3.13p, 3.14.. "Translation to your awful language is left as an exercise for the reader!" (citation Lynn Killingbeck) is therefore not necessary. It might be useful to compare the GNAT Ada implementations with some of the C hacks. BTW, does anybody know if G.Marsaglia's full testsuite DIEHARD has been applied to the GNAT Ada RNG's? Thanks, Hugo Pfoertner Robert Dewar schrieb: > > "sachi" wrote in message news:... > > > I am using ADA 95 random number generator which is a LCG, the numbers being > > generated are then taken modulo of so as to get the desired range. However > > they aint very random.. > > I can't believe that your Ada 95 compiler is so broken > as to use an LCG for the random number generation, since > this clearly would not meet the requirements of the Ada > standard. What compiler are you using? What random number > routine? What exactly do you mean by "ain't very random". > Certainly you cannot be using the standard Ada library > routine in GNAT, since most certainly this is not an LCG.