Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Thu, 26 Jun 2025 17:10:48 -0700 Organization: None to speak of Lines: 22 Message-ID: <87y0teyrg7.fsf@nosuchdomain.example.com> References: <87y0wjaysg.fsf@gmail.com> <20250403150210.000020f8@yahoo.com> <86selt8lxv.fsf@linuxsc.com> <20250428162738.00007c1d@yahoo.com> <103j290$3bv4a$1@dont-email.me> <8734bm1eqz.fsf@nosuchdomain.example.com> <20250626235916.00003314@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Fri, 27 Jun 2025 02:10:50 +0200 (CEST) Injection-Info: dont-email.me; posting-host="3c6439d991b3a050e2c039482d4d2fd5"; logging-data="3933161"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+u8K583Qui0AYwbTeZOJ6q" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:vhudyEx5wJ/TtMpHLksZR+XTlUY= sha1:P3N8dw88dWqvXmh8v7hHISRfZ5Q= scott@slp53.sl.home (Scott Lurndal) writes: [...] > But not all decimal floating point implementations used "hex floating point". > > Burroughs medium systems had BCD floating point - one of the advantages > was that it could exactly represent any floating point number that > could be specified with a 100 digit mantissa and a 2 digit exponent. BCD uses 4 bits to represent values from 0 to 9. That's about 83% efficent relative to pure binary. (And it still can't represent 1/3.) Another option (I think IBM has implemented this) is to use 10 bits to represent values from 0 to 999, taking advantage of the nice coincidence that 2**10 is barely bigger than 10**3. That's more than 99.6% efficient relative to pure binary. Of course it's still more complicated to implement. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com void Void(void) { Void(); } /* The recursive call of the void */