>Leroy H <l…@somewhere.net>wrote:
>>On Fri, 16 Oct 2026 11:44:54 -0400, Chris Ahlstrom wrote:
>
>>
>> For C++, Boost.Decimal.
>>
>
>Some people don't use C++. I would hope that most would not.
>
>It is recommended, and even required in some countries, that all
>financial software be written using decimal FP.
>
>But once libdfp drops out then GNU/Linux C programmers will be
>stuck.
>
Well C++ is a crime against humanity
'operator overloading...' crap bloated crap.
But maybe you can call 'wcalc' from the C code,
it supports stdin - stdout
raspberrypi: ~ # wcalc -EE
Enter an expression to evaluate, q to quit, or ? for help:
-> 1/pi
= 0.318310
-> q
raspberrypi: ~ # echo "1/pi" | wcalc
= 0.31831
raspberrypi: ~ # echo "1/pi" | wcalc -EE
= 0.318310
You can just do decimal in C
Use type double if you are worried about microcents.
I have written financial software in C.
What is the problem?