The GCC docs describe limited decimal floating point support in recent GCCs.
But how do I actually use it?
For example on Fedora 18, GCC 4.7.2.
A simple C program like
int main()
{
_Decimal64 x = 0.10dd;
return 0;
}
compiles (when using -std=gnu99) - but how do I actually do other useful stuff - like printing _Decimal64 values or converting strings to _Decimal64 values?
The docs talk about 'a separate C library implementation' for (I assume) things like printf - which additional library do I have to use for - say - printing the result of a decimal floating point computation?
I've tried
printf("%Df\n", x);
which did not work - printf just produced: %Df
.