This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using _Decimal64


On 7 September 2017 at 18:02, A.J. Bonnema wrote:
> On 09/06/2017 06:21 PM, Jonathan Wakely wrote:
>>
>> On 6 September 2017 at 16:59, A.J. Bonnema wrote:
>>
>> Indeed, when I created a small program, it compiles. Doesn't run as I
>> expected (printf shows a different value), but it compiles and runs.
>
>
> 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.

> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]