Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I enjoyed reading this! It's not always possible but finance data that translates directly into cents/euro-cents/pence/yen/etc is really nice to work with as integers. Obviously as soon as you need to divide that stops being such a solid strategy though. . .




Thanks! And you're right this is true for storage and at the transaction level where nothing smaller than, e.g., a penny is allowed to move or exist in the first place. But when you're working with interest rates and the main calculations involve multiplying by numbers < 1, you still have to figure out rounding.



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

Search: