SQLite Forum

Decimal128
Login
Base 2 floating point is entirely adequate for financial applications.  You simply have to keep the numbers within the precision bounds of the format you supply.  

Binary32 is good for magnitudes up to 1e2.  
Binary64 is good for magnitudes up to 1e10.  
Binary128 is good for magnitudes up to 1e29.

Similarly for the Decimal format.  The only difference is that the decimal format is good for one more digit at the 8 byte size.

Decimal32 is good for magnitudes up to 1e2.  
Decimal64 is good for magnitudes up to 1e10 or 1e11.  
Decimal128 is good for magnitudes up to 1e29.

Of course, you have to address "proper exact rounding" but you have to do that with anything you use in the modern world since correct "exactly rounded" scaled decimal arithmetic is only (and was ever only) supported in COBOL (and PL/1),  In all other languages since then you have to program your "exactly rounded" computations very carefully since there are no (or very few) runtime libraries that will do it for you.

Never trust anyone who says they need "decimal arithmetic" for money because it is self evident that they have no knowledge of what they speak, they are only spouting rumours propagated by the ill-informed.