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

It's perfectly possible to generate accountant rounding using integers. If the accuracy required is one cent then the system must merely multiply by 10 before calculating and then use dutch round to the nearest 10 before dividing by 10. I'm pretty sure you could do it with quarter cent accuracy rather than 10ths of a cent.

You just shouldn't calculate with 1 cent accuracy if the rounding methodology is important to your business, but truth be told most businesses have a lot more to optimize than the rounding methodology used.




>> but truth be told most businesses have a lot more to optimize than the rounding methodology used.

Perfectly true. I can see exceptions being managing other people's money--banks, accountants, and the IRS had damn well better get this right.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: