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

What if I'm calculating sales tax? Can't use an integer anymore.



Yes, you can. There are algorithms for rounding up, rounding down, rounding to nearest, and banker's rounding, on the results of integer division. This is a solved problem.




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

Search: