14 May
2024
14 May
'24
1:09 p.m.
The only real advantage of decimal floating point is lossless conversion to and from decimal text representations. I guess decimal floating point could be useful for a calculator app or a spreadsheet, where the text representation of a number is paramount, but not much else.
That's a large class of applications. One of our known users is a trading firm and the majority of their use is add/sub/mul/div and conversion to/from text via `to_chars` and `from_chars`. Not only are we able to do these text conversions exactly we can do it fast since we have deep familiarity with the problem set: https://cppalliance.org/decimal/decimal.html#benchmarks_charconv. Matt