Boost logo

Boost :

From: Kostas Savvidis (kotika98_at_[hidden])
Date: 2025-01-19 20:13:34


> On 18 Jan 2025, at 16:03, Ivan Matek via Boost <boost_at_[hidden]> wrote:
>
> The most commonly though-of domain, finance, doesn't actually need
> it (they really need decimal fixed-point, not decimal floating point).

Its an interesting point, and I was interested to see if the authors will make some strong case
that decimal floating-point is needed in finance. Obviously, as you mention, if financial calculations are supposed to be
rounded to cents at every stage, one could write the entire software operating with integers (cents), and only converting to dollars and cents at
the report printing stage.

Similarly, in the bitcoin domain, AFAIK, transfers and accounting is supposed to be done not in floating point but in integer satoshi.

But should it be done this way or in floating decimals? Is it possible to emulate decimal fixed-point using decimal floating-point?
The user guide is silent on any of these questions, so I have not been able to make up my mind if this library is needed or not in finance.

For general mathematical use, and any sort of scientitic calculations, I am now 100% convinced decimals must not be used.

The only other conceivable use, to write a spreadsheet and/or calculator software,
but again there is nothing in the docs to inform us how is this supposed to be accomplished.

Cheers,
Kostas


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk