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: 109d8a,3cb5ab44ff758e6b X-Google-NewGroupId: yes X-Google-Thread: 1014db,3cb5ab44ff758e6b X-Google-NewGroupId: yes X-Google-Thread: fb57f,3cb5ab44ff758e6b X-Google-NewGroupId: yes X-Google-Thread: 101deb,43a0a81c48fef482 X-Google-NewGroupId: yes X-Google-Thread: 1094ba,43a0a81c48fef482 X-Google-NewGroupId: yes X-Google-Thread: 107079,43a0a81c48fef482 X-Google-NewGroupId: yes X-Google-Thread: 103376,43a0a81c48fef482 X-Google-NewGroupId: yes X-Google-Attributes: gid9ef9b79ae9,gid4516fb5702,gid2dda566af5,gidbda4de328f,gid8d3408f8c3,gid7a498f3897,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!goblin1!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: sci.math,comp.lang.c,sci.crypt,comp.lang.pl1,comp.lang.fortran,sci.math.num-analysis,comp.lang.ada References: <603ebe15-a32f-4fbb-ba44-6c73f7919a33@t35g2000yqj.googlegroups.com> Subject: Re: RNGs with periods exceeding 10^(40million). Date: Tue, 18 Jan 2011 21:09:29 +1100 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.5994 Message-ID: <4d35690c$0$66044$c30e37c6@exi-reader.telstra.net> NNTP-Posting-Host: 123.3.18.235 X-Trace: 1295345933 exi-reader.telstra.net 66044 123.3.18.235:1044 Xref: g2news2.google.com sci.math:217825 comp.lang.c:122356 sci.crypt:30837 comp.lang.pl1:2084 comp.lang.fortran:34276 sci.math.num-analysis:17401 comp.lang.ada:17488 Date: 2011-01-18T21:09:29+11:00 List-Id: "geo" wrote in message news:603ebe15-a32f-4fbb-ba44-6c73f7919a33@t35g2000yqj.googlegroups.com... | | I offer here a MWC (Multiply-With-Carry) RNG whose | period I cannot determine---nor is it likely that | anyone else can---but that unknown period is almost | certainly greater than 10^40000000, i.e, 10^(40million). Here is the 64-bit version using PL/I :-- /* 64-bit version in PL/I using unsigned arithmetic 18/1/2011 */ (nosize): rng64: procedure options (main); declare (Q(0:2097151), carry initial (0)) unsigned fixed binary (64) static; B64MWC: procedure () returns (unsigned fixed binary (64)); declare (t,x) unsigned fixed binary (64); declare j fixed binary (31) static initial (2097151); j=iand(j+1, 2097151); x=Q(j); t=isll(x, 28)+carry; carry=isrl(x, 36)-(t