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:a6b:6315:: with SMTP id p21-v6mr7029180iog.43.1531729227351; Mon, 16 Jul 2018 01:20:27 -0700 (PDT) X-Received: by 2002:aca:eb15:: with SMTP id j21-v6mr3699947oih.6.1531729227200; Mon, 16 Jul 2018 01:20:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!news.redatomik.org!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!85.12.16.68.MISMATCH!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g2-v6no5050259itf.0!news-out.google.com!n194-v6ni4597itg.0!nntp.google.com!d7-v6no5059404itj.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 16 Jul 2018 01:20:27 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=57.79.21.10; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 57.79.21.10 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5a66cd8a-e11d-4a59-bce1-8cc693b4160a@googlegroups.com> Subject: Simple hash or pseudo-random function From: gautier_niouzes@hotmail.com Injection-Date: Mon, 16 Jul 2018 08:20:27 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 1925 X-Received-Body-CRC: 4078803408 Xref: reader02.eternal-september.org comp.lang.ada:53838 Date: 2018-07-16T01:20:27-07:00 List-Id: 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 nu= mber that is pseudo-random, uniformily distributed (could be a floating-poi= nt 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 tha= t are for hashing strings, but they could be too time-consuming: it's for a= number-crunching program where this function will be called billions of ti= mes, so I'm looking for something really simple (and fast :-) ). TIA _________________________=20 Gautier's Ada programming=20 http://gautiersblog.blogspot.com/search/label/Ada=20 NB: follow the above link for a valid e-mail address=20