Article View: comp.sys.powerpc
Article #3145Re: Debate: PowerMac "trounces" Pentium....???
From: Dan Pop
Date: Tue, 20 Feb 1996 20:34
Date: Tue, 20 Feb 1996 20:34
28 lines
1856 bytes
1856 bytes
In <nevin-1902962045260001@150.135.1.79> nevin@CS.Arizona.EDU (Nevin ":-]" Liber) writes: >In article <kevinbDMv1Br.2C1@netcom.com>, kevin@frobozz.sccsi.com (Kevin >Brown) wrote: > >> You've got to be kidding. This is kiddie stuff... >> In case you were wondering, the magic "241 / 100" in the BUFLEN >> expression comes from log(256), which is the number of base-10 digits >> required to represent a single byte. > >Sorry Kevin, but a "byte" under ANSI C is *not* guaranteed to be 8 bits. > >For a bunch of people (Dan Pop, yourself, etc.) claiming that it is >trivial to write portable ANSI C code, you are certainly having a very >tough time getting this code correct. Talk for yourself. It's trivial to get the code correct, no matter the size in bits of character (byte). All you have to know is that a decimal digit can represent log(10)/log(2) bits. Computing the number of decimal digits needed to represent CHAR_BIT * sizeof(int) bits is a job for a first-grader. Even you could do it! Dan -- Dan Pop CERN, CN Division Email: danpop@mail.cern.ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
Technical Details
Message-ID:
<danpop.824848496@rscernix>Path:
arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpopReferences:
<nevin-0602962253080001@150.135.1.79> <nevin-1202960529130001@150.135.1.79> <9602121654.AA02634@ues5.cern.ch> <4fqdta$rhh@meaddata.lexis-nexis.com> <kevinbDMv1Br.2C1@netcom.com> <nevin-1902962045260001@150.135.1.79>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!rcp6.elan.af.mil!rscernix!danpop From: danpop@mail.cern.ch (Dan Pop) Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel Subject: Re: Debate: PowerMac "trounces" Pentium....??? Date: 20 Feb 96 20:34:56 GMT Organization: CERN European Lab for Particle Physics Message-ID: <danpop.824848496@rscernix> References: <nevin-0602962253080001@150.135.1.79> <nevin-1202960529130001@150.135.1.79> <9602121654.AA02634@ues5.cern.ch> <4fqdta$rhh@meaddata.lexis-nexis.com> <kevinbDMv1Br.2C1@netcom.com> <nevin-1902962045260001@150.135.1.79> NNTP-Posting-Host: ues5.cern.ch X-Newsreader: NN version 6.5.0 #7 (NOV)