Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #167795

Re: C23 _Decimal64 etc

From Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups comp.lang.c
Subject Re: C23 _Decimal64 etc
Date 2022-09-22 11:29 -0700
Organization None to speak of
Message-ID <87o7v7dzz0.fsf@nosuchdomain.example.com> (permalink)
References <7724aa36-2772-4736-aedc-1de37b10e35fn@googlegroups.com>

Show all headers | View raw


Thiago Adams <thiago.adams@gmail.com> 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 */

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

C23 _Decimal64 etc Thiago Adams <thiago.adams@gmail.com> - 2022-09-22 07:09 -0700
  Re: C23 _Decimal64 etc Bart <bc@freeuk.com> - 2022-09-22 17:23 +0100
    Re: C23 _Decimal64 etc Thiago Adams <thiago.adams@gmail.com> - 2022-09-22 10:44 -0700
    Re: C23 _Decimal64 etc David Brown <david.brown@hesbynett.no> - 2022-09-22 23:03 +0200
  Re: C23 _Decimal64 etc Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2022-09-22 11:29 -0700
    Re: C23 _Decimal64 etc Richard Damon <Richard@Damon-Family.org> - 2022-09-22 19:10 -0400
      Re: C23 _Decimal64 etc Bart <bc@freeuk.com> - 2022-09-23 01:19 +0100
        Re: C23 _Decimal64 etc Richard Damon <Richard@Damon-Family.org> - 2022-09-22 23:42 -0400
        Re: C23 _Decimal64 etc Michael S <already5chosen@yahoo.com> - 2022-09-23 02:50 -0700
  Re: C23 _Decimal64 etc Thomas David Rivers <rivers@dignus.com> - 2022-09-29 14:06 -0400

csiph-web