Using _Decimal64

A.J. Bonnema
Thu Sep 7 17:19:00 GMT 2017

On 09/07/2017 07:06 PM, Jonathan Wakely wrote:
> On 7 September 2017 at 18:02, A.J. Bonnema wrote:
>> The _Decimal type is actually pretty awesome! Except for printf for which I
>> have to cast back to float or double, it works just like other numeric
>> variables.
> Glibc allows printf-hooks that can be used to add support for new
> types, like the decimal float types. I'm not sure if any hooks are
> provided by GCC or not.

Hmm, that certainly is an option. I don't know how complicated it is, 
but it is worth a check if gcc already supports such a printf-hook.

>> Apart from that it is not a part of the current C standard (C11) why don't
>> we see more people talking about this? As far as I can see it is an
>> excellent addition for financial and reporting applications. Just wondering.
> The performance isn't as good as some people would like.
Yeah, that really is a pity. Looking at the library that ICU provided, 
they are concerned about performance as well.
Still, once the features are there, and it is being used, I expect 
performance will follow.

If on the other hand people move away from C, then we might never see 
that day. Only time will tell.

More information about the Gcc-help mailing list