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 2002:a24:b045:: with SMTP id b5-v6mr147802itj.35.1531802698706; Mon, 16 Jul 2018 21:44:58 -0700 (PDT) X-Received: by 2002:aca:de07:: with SMTP id v7-v6mr25538oig.5.1531802698268; Mon, 16 Jul 2018 21:44:58 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.uzoreto.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g2-v6no103631itf.0!news-out.google.com!l67-v6ni367itl.0!nntp.google.com!g2-v6no103628itf.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 16 Jul 2018 21:44:58 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le NNTP-Posting-Host: 202.67.103.232 References: <5a66cd8a-e11d-4a59-bce1-8cc693b4160a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <51d4a3fe-3c40-45b9-b900-a093d4c01810@googlegroups.com> Subject: Re: Simple hash or pseudo-random function From: robin.vowels@gmail.com Injection-Date: Tue, 17 Jul 2018 04:44:58 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:53861 Date: 2018-07-16T21:44:58-07:00 List-Id: On Monday, July 16, 2018 at 11:34:02 PM UTC+10, Shark8 wrote: > On Monday, July 16, 2018 at 2:20:28 AM UTC-6, gautier...@hotmail.com wrot= e: > > Hello, > > Does someone have a function that would take an integer (range 0 .. 2**= 63), not uniformily distributed (it's a code with some meaning) and return = a number that is pseudo-random, uniformily distributed (could be a floating= -point number or an integer in a range of minimum length 365) ? > > The difficulty for me is to find a very simple function. There are many= that are for hashing strings, but they could be too time-consuming: it's f= or a number-crunching program where this function will be called billions o= f times, so I'm looking for something really simple (and fast :-) ). > > TIA >=20 > There was somebody a few years back who was an older Mathematician who po= sted a RNG function to this board some years ago. That might be useful for = you. (I want to say his method was KISS#### or something like that.) That was George Marsaglia, and he was author of a number of excellend pseudo random number generators.