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,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!feeder.news-service.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: sci.math,comp.lang.c,comp.lang.fortran,comp.lang.pl1,comp.lang.ada References: <4dae2a4b$0$55577$c30e37c6@exi-reader.telstra.net> <4dbd6e9c$0$12957$892e0abb@auth.newsreader.octanews.com> <925saiFj03U7@mid.individual.net> <4dbe2304$0$12961$892e0abb@auth.newsreader.octanews.com> Subject: Re: KISS4691, a potentially top-ranked RNG. Date: Mon, 23 May 2011 16:53:47 +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.6090 Message-ID: <4dda0486$0$67782$c30e37c6@exi-reader.telstra.net> NNTP-Posting-Host: 123.2.70.40 X-Trace: 1306133638 exi-reader.telstra.net 67782 123.2.70.40:10012 Xref: g2news2.google.com sci.math:237138 comp.lang.c:128170 comp.lang.fortran:43420 comp.lang.pl1:2533 comp.lang.ada:20346 Date: 2011-05-23T16:53:47+10:00 List-Id: wrote in message news:iplmk8$2s6$1@gosset.csi.cam.ac.uk... | As those of us with significant experience of portability will | remember, building fixed sizes into a program is a cardinal | error. Sooner or later, you will want to run that code on a | system with different sizes, and it won't work. That's because FORTRAN was designed around a word machine, where float precisions offered were single and/or single and double precision. That could cause different actions when moving from a 32-bit word machine to 60/64-bit word machine, Later languages, including PL/I, were designed bearing in mind byte machines. The way in which float precisions are specified lends itself to portability. Thus, asking for say, 12 decimal digits got you about that number of digits, whether the machine offered 32-bit or 60-bit words. Some machines actually offered decimal (BCD) floats in hardware,* and asking for 12 decimals got you about that number of digits. | The vast | majority of clean programs, even in C90, needed NO source | changes to go from 32 to 64 bits; I have written code that was | moved to systems with 16, 24, 32, 36, 48, 60, 64 and perhaps | other sizes, and so have many other people. Indeed. (Including doing portable character handling before F77.) | I accept that Marsaglia's generator is a valid case for using | fixed-width types, but that is likely to make it very inefficient | indeed on a system where they are not natural. I very much doubt that any new machine is going to offer less than 32 bit integer words ; for some years now the trend has been to machines of 64-bit integers. Marsaglia's (integer) algorithms will run on such machines, some possibly with minor alterations, but will not, even if modified, will not run "inefficiently". | Masking is a | far more portably efficient approach. _______________ * some still do, in an updated verion of decimal.