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: g2news1.google.com!news4.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson 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 12:53:27 -0700 Organization: None to speak of Message-ID: 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=us-ascii Injection-Info: mx01.eternal-september.org; posting-host="mytEQcPL+ceHcrnNa7VoaQ"; logging-data="6416"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mBFYTrjckHgk3tGAt6TYU" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:vUfRzn5Gqrv/cFllkFvX4RwV6Hc= sha1:4XIFvWK1eydkvmPpN2FZP7xvsE0= Xref: g2news1.google.com sci.math:217158 comp.lang.c:115377 comp.lang.fortran:39025 comp.lang.pl1:2314 comp.lang.ada:19091 Date: 2011-04-29T12:53:27-07:00 List-Id: glen herrmannsfeldt writes: > In comp.lang.fortran Keith Thompson wrote: > (snip, I wrote) >>> No. You need CHAR_BIT to tell how many bits are in a char. >>> It has been known to get to 64 on word addressed 64 bit machines. >>> It must be at least 8, but can be more. > >> Certainly CHAR_BIT *could* be 64 (or even more), but I've never heard >> of a 64-bit system with CHAR_BIT==64. Such an implementation would >> have trouble dealing with octet-oriented data from other systems. >> Some DSPs (digital signal processors) do have CHAR_BIT > 8. >> There have been systems with, for example, 9-bit bytes, but they >> had pretty much become obsolete by the time C was standardized. > > The story I remember was for a Cray machine, but I never used > one to check on it. I do know that there are some 64 bit > word addressed machines, especially some from Cray. I used to work on a Cray T90. It had 64-bit words, and no direct hardware access to smaller chunks of memory; to read an 8-bit byte, you had to read the word containing it and then extract the bits you wanted. But the C compiler (C90, it never implemented C99) had CHAR_BIT==8. char was 8 bits; short, int, and long were all 64 bits. A pointer to anything smaller than a 64-bit word stored the byte offset in the high-order 3 bits (the address space was much smaller than 64 bits, so the high-order bits weren't being used for anything else). This was all handled in software; the compiler had to generate extra instructions to deal with byte data. Making CHAR_BIT==64 would have made much more sense for the machine itself in isolation, but it would have made interoperability with other systems quite difficult. It ran Unicos, Cray's BSDish Unix; I'm not sure you can even implement Unix with bytes bigger than 8 bits. It made it very slow for things like string processing, but since it was primarily used for floating-point computations that wasn't much of an issue. Some older Cray vector systems ran other, non-Unix, operating systems (COS, CTSS), but I never used any of those, and I don't know what value their compilers used for CHAR_BIT -- if C was even supported. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"