Path: csiph.com!news.mixmin.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: C23 _Decimal64 etc Date: Thu, 22 Sep 2022 11:29:55 -0700 Organization: None to speak of Lines: 27 Message-ID: <87o7v7dzz0.fsf@nosuchdomain.example.com> References: <7724aa36-2772-4736-aedc-1de37b10e35fn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="b6dd3111f3087e08fb468b174c9193d6"; logging-data="2402834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/BNXJxFcryU9eWSIhsAqni" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:hSiBFrUWEo2TXzzJzkSC5s3uzUg= sha1:L0Po+MmZT18bvP9JM+KMDtaI+Gk= Xref: csiph.com comp.lang.c:167795 Thiago Adams writes: > Decimal floating point types were added into C23. > > I was wondering.. how it will be implemented by c23 compilers? > Is it already supported in x86 / x64 / arm? > > or it is a kind of emulation? Decimal floating types are optional in C23. Presumably they'll be implemented in hardware for targets that support them, or in emulation or not at all for targets that don't. gcc already supports decimal floating-point on some targets. A quick test indicates that it generates function calls for _Decimal64 addition, for example. I don't know the details. From the gcc manual: As an extension, GNU C supports decimal floating types as defined in the N1312 draft of ISO/IEC WDTR24732. Support for decimal floating types in GCC will evolve as the draft technical report changes. Calling conventions for any target might also change. Not all targets support decimal floating types. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */