Sujet : Re: "A diagram of C23 basic types"
De : jameskuyper (at) *nospam* alumni.caltech.edu (James Kuyper)
Groupes : comp.lang.cDate : 29. Jun 2025, 14:23:01
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <103renl$1aql2$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : Mozilla Thunderbird
On 2025-06-28 19:59, Lawrence D'Oliveiro wrote:
On Fri, 27 Jun 2025 14:52:42 +0300, Michael S wrote:
For fix point, anything "decimal" is even less useful than in floating
point. I can't find any good explanation for use of "decimal" things in
some early computers except that their designers were, may be, good
engineers, but 2nd rate thinkers.
IEEE-754 now includes decimal floating-point formats in addition to the
older binary ones. I think this was originally a separate spec (IEEE-854),
but it got rolled into the 2008 revision of IEEE-754.
It's somewhat more complicated than that. IEEE-784 is a
radix-independent standard, otherwise equivalent to IEEE-754. Basically,
IEEE-754 is "IEEE-784 with radix==2". A conforming implementation of any
version of C could also have used "IEEE-784 with radix==10". However,
the decimal floating point formats added to IEEE-754 in 2008 were not
simply "IEEE-784 with radix==10", and therefore could not have been used
as standard floating types in earlier versions of the C standard. See
<
https://en.wikipedia.org/wiki/Decimal_floating_point> for more details.
There are real systems that implement these new formats in hardware. A
lot of wording was added and changed in the C standard to allow these
new formats to be used as C's new decimal floating types.