3 ms·
Hmmm. I dunno. Why wouldn't currency by handled by the type system? You could still have an overrun. But it'd be handled more appropriately. Long ago, I wrote
by specialist 14y ago
Hmmm. I dunno.
Why wouldn't currency by handled by the type system? You could still have an overrun. But it'd be handled more appropriately.
Long ago, I wrote a budgeting / estimating tool. Costs were represented with binary coded decimals (BCDs). Not floating point numbers. Just like an accounting system.
Competing products could have weird roundoff errors. Not mine.
- FullyFunctional 14y agoFor accounting, why not just use scaled integers? Isn't there a limit to many many digits you want after the period? BTW, I think BCD is outmoded. Seems it's getting replace by DPD which has far less overhead (http://en.wikipedia.org/wiki/Binary-coded_decimal#Higher-density_encodings http://en.wikipedia.org/wiki/Binary-coded_decimal#Higher-den...).