Hacker News new | past | comments | ask | show | jobs | submit login

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.




For 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-den...).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: