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: 103376,c5d0be666830517 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!exi-transit.telstra.net!news.telstra.net!exi-spool.telstra.net!exi-reader.telstra.net!not-for-mail From: "robin" Newsgroups: comp.lang.ada References: <9ea9185a-23e7-4265-acde-097c5c14ca14@y11g2000yqm.googlegroups.com> Subject: Re: KISS4691, a potentially top-ranked RNG. Date: Mon, 26 Jul 2010 12:50:58 +1000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.5931 Message-ID: <4c4cf81a$0$12395$c30e37c6@exi-reader.telstra.net> NNTP-Posting-Host: 123.3.20.109 X-Trace: 1280112666 exi-reader.telstra.net 12395 123.3.20.109:1048 Xref: g2news1.google.com comp.lang.ada:12570 Date: 2010-07-26T12:50:58+10:00 List-Id: "Gene" wrote in message news:9ea9185a-23e7-4265-acde-097c5c14ca14@y11g2000yqm.googlegroups.com... "geo" wrote in message news:a82cebe3-cdb9-48af-8080-bca935eeb9b1@l14g2000yql.googlegroups.com... |I have been asked to recommend an RNG | (Random Number Generator) that ranks | at or near the top in all of the categories: | performance on tests of randomness, | length of period, simplicity and speed. | The most important measure, of course, is | performance on extensive tests of randomness, and for | those that perform well, selection may well depend | on those other measures. | | The following KISS version, perhaps call it KISS4691, | seems to rank at the top in all of those categories. | It is my latest, and perhaps my last, as, at age 86, | I am slowing down. | | Compiling and running the following commented | C listing should produce, within about four seconds, | 10^9 calls to the principal component MWC(), then | 10^9 calls to the KISS combination in another ~7 seconds. | | Try it; you may like it. | | George Marsaglia Here's the PL/I version: (NOSIZE, NOFOFL): RNG: PROCEDURE OPTIONS (MAIN, REORDER); declare (xs initial (521288629), xcng initial (362436069), Q(0:4690) ) static fixed binary (32) unsigned; MWC: procedure () returns (fixed binary (32) unsigned); /*takes about 4.2 nanosecs or 238 million/second*/ declare (t,x,i) fixed binary (32) unsigned; declare (c initial (0), j initial (4691) ) fixed binary (32) unsigned static; if j < 4690 then j = j + 1; else j = 0; x = Q(j); t = isll(x,13)+c+x; c = (t