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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 109d8a,232e89dd4cc3c154 X-Google-NewGroupId: yes X-Google-Thread: 1014db,232e89dd4cc3c154 X-Google-NewGroupId: yes X-Google-Thread: 1094ba,232e89dd4cc3c154 X-Google-NewGroupId: yes X-Google-Thread: 101deb,dea70f96af442ea2 X-Google-NewGroupId: yes X-Google-Thread: 103376,232e89dd4cc3c154 X-Google-NewGroupId: yes X-Google-Attributes: gid9ef9b79ae9,gid4516fb5702,gid8d3408f8c3,gidbda4de328f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: sci.math,comp.lang.c,comp.lang.fortran,comp.lang.pl1,comp.lang.ada Subject: Re: KISS4691, a potentially top-ranked RNG. Date: Fri, 29 Apr 2011 14:09:15 +1200 Message-ID: <91ukucFq9cU2@mid.individual.net> References: <4dae2a4b$0$55577$c30e37c6@exi-reader.telstra.net> <4db90113$0$77724$c30e37c6@exi-reader.telstra.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 2bOtAetxR3kHiH4Ik56LkgxokatAhfRaFdqzDSr+lOSwBj+t1m Cancel-Lock: sha1:yfO80M0smWztuOIMtFvatGvEgyQ= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: Xref: g2news2.google.com sci.math:234213 comp.lang.c:126614 comp.lang.fortran:41256 comp.lang.pl1:2417 comp.lang.ada:20050 Date: 2011-04-29T14:09:15+12:00 List-Id: On 04/29/11 01:50 PM, David Bernier wrote: > e p chandler wrote: >> >> >> "robin" wrote in message >> >> | So, what is all this? In particular, is there something special about >> | the value of 3.7 billion? >> >>> No, nothing special at all. >>> The purpose of the exercise is just to confirm that after generating >>> 1000000000 random numbers, you get the same answer as George does. >> >> Alas, I think you are making some strong assumptions about the state of >> computing in the hereafter. >> > > All we have now are George Marsaglia's posts and writings. > I know there's now a move on the way to 64-bit processors, > which I take to mean the x86_64 or AMD64 design/instruction set. The move happened several years ago (at least on the desktop and server). > In any case, with an executable compiled with a C compiler, > there's the function sizeof, which might be useful > in some cases at run time. Being pedantic, sizeof is a compile time operator when used with integral types. > For example, one could add to main() in C : > > printf("the size of an unsigned long in bytes is %d\n", sizeof(unsigned long)); Given the code as written, assert(sizeof(unsigned long) == 4) would be more use. > There's also the Itanium architecture and others, and even with a known > processor, some compiler flags affect the number of bytes for > some data types, such as "long double" with the -m64 flag > on Fujitsu SPARC IV with Sun Solaris (--> 16 byte long > doubles with the -m64 flag). > > AFAIK, sizeof(unsigned long) can be relied upon to give the size > in 8-bit bytes of a C "unsigned long". sizeof(unsigned long) is by definition the size in (not necessarily 8 bit) bytes of an unsigned long. > Perhaps some documentation of language, machine, compiler, compiler > options examples where KISS4691 works as per the Marsaglia > specs could be helpful as a reference ... I suggested long ago the code be updated to use fixed width types, thus removing any ambiguities. -- Ian Collins