2 ms·
It is proven that the binary FP accumulates errors slower than any other bigger base when the longer scientific calculations are involved. But when you want to
by acqq 12y ago
It is proven that the binary FP accumulates errors slower than any other bigger base when the longer scientific calculations are involved.
But when you want to represent something like money, there's by definition an error as soon as you want to store 0.01 as the binary FP, and the same error doesn't happen in decimal FP.
- wolfgke 12y agoOn the other hand: If your smallest unit of money is cents (or perhaps tenth of cents), you better use large integers to store the amount of money instead of base 10 floating point numbers.