Deutsch English Français Italiano |
<vsldst$28l7$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: David Brown <david.brown@hesbynett.no> Newsgroups: comp.lang.c Subject: Re: "A diagram of C23 basic types" Date: Thu, 3 Apr 2025 09:38:05 +0200 Organization: A noiseless patient Spider Lines: 48 Message-ID: <vsldst$28l7$2@dont-email.me> References: <87y0wjaysg.fsf@gmail.com> <vsinf4$17d6t$1@dont-email.me> <20250402002355.284@kylheku.com> <vsl05e$3lfm4$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 03 Apr 2025 09:38:06 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d65639e364606db0746acbec737df138"; logging-data="74407"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AlT/3QGNHFfEaegJ7IaFQCqPpoLGMwYI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Cancel-Lock: sha1:4wQenALP+1dkbMevn6rS+qQucyc= Content-Language: en-GB In-Reply-To: <vsl05e$3lfm4$1@dont-email.me> Bytes: 3222 On 03/04/2025 05:43, Janis Papanagnou wrote: > On 02.04.2025 09:32, Kaz Kylheku wrote: >> On 2025-04-02, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: >>> On 02.04.2025 07:59, Alexis wrote: >>>> >>>> Thought people here might be interested in this image on Jens Gustedt's >>>> blog, which translates section 6.2.5, "Types", of the C23 standard >>>> into a graph of inclusions: >>>> >>>> https://gustedt.wordpress.com/2025/03/29/a-diagram-of-c23-basic-types/ >>> >>> A nice overview. - I have questions on some of these types... >>> >>> The _Decimal* types - are these just types with other implicit >>> encodings, say, BCD encoded, or some such? >> >> IEEE 754 defines decimal floating point types now, so that's what >> that is about. The spec allows for the significand to be encoded >> using Binary Integer Decimal, or to use Densely Packed Decimal. > > Thanks for the hint and keywords. It seems my BCD guess was not far > from what these two IEEE formats actually are. > > Does that now mean that every conforming C23 compiler must support > yet more numeric types, including multiple implementation-versions > of the whole arithmetic functions and operators necessary? > They are an optional feature (as are the other floating point and complex types beyond the basics of float, double and long double). > I wonder why these variants had been introduced. I presume that some people want them. They are in the ISO 60559 standard, along with things like "interchange" floating point types intended to be maximally consistent between different systems. > > In many other languages you have abstractions of numeric types, not > every implicitly encoding variant revealed an the programming level. > That's often fine within a program, but sometimes you need to exchange data with other programs. In particular, C is the standard language for common libraries - being able to reliably and consistently exchange data with other languages and other machines is thus very important.