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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.200.55.235 with SMTP id e40mr5541578qtc.32.1474895073884; Mon, 26 Sep 2016 06:04:33 -0700 (PDT) X-Received: by 10.157.17.198 with SMTP id y6mr1320361oty.1.1474895073841; Mon, 26 Sep 2016 06:04:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m9no2838405qte.0!news-out.google.com!w143ni13215itb.0!nntp.google.com!x192no4759962itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 26 Sep 2016 06:04:33 -0700 (PDT) In-Reply-To: <62fef12a-90fb-4ac8-8e59-99568b914ee7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8302:3f70:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8302:3f70:5985:2c17:9409:aa9c References: <5db08ea5-c088-4d16-9d88-d058e4bc48df@googlegroups.com> <62fef12a-90fb-4ac8-8e59-99568b914ee7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8bb59ac2-f5ba-44df-87ae-63d3dd47f0a3@googlegroups.com> Subject: Re: Ada.Numerics.Float_Random.Generator question From: Robert Eachus Injection-Date: Mon, 26 Sep 2016 13:04:33 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:31901 Date: 2016-09-26T06:04:33-07:00 List-Id: On Sunday, September 25, 2016 at 7:41:26 PM UTC-4, brbar...@gmail.com wrote= : >=20 > > I hope that there is a better solution to this. Is there? >=20 > Probably best consult Knuth on Random Numbers. Complicated subject; lots > of numerical issues - testing involves some high-powered math. See also > Park and Miller in CACM back a fer decades ago. =20 Sigh! I'm probably not the best expert available on random numbers (and pse= udo RNGs). But I could write a book on the inadequacies of Park and Miller= , or all that has been learned since Knuth. It is now possible to have fas= t PRNGs based on Blum, Blum, and Schub (https://en.wikipedia.org/wiki/Blum_= Blum_Shub ) and that is now thirty year old technology. The latest includes= not only cryptographically secure RNGs, but quantum cryptography which all= ows for seeds to be communicated without risk of evesdropping. Most of that is more than needed for most RNGs, but there is no reason not = to be at least that good. Park and Miller for example will "roll over" and = start generating the same sequence again. When it was publish this was not= a big risk. Today even "small" simulations will use more values that Park= and Miller should be used to generate. Oh, and I should probably write up a paper on using RNGs correctly. It is = silly to use an RNG that has lots of (theoretical) nice properties, then th= row all that away in how you use the RNG.=20