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

> You store the sums on either end, the currencies, the exchange rate and the final sum?

There is a remarkable amount of disagreement as to whether one should do one’s back office work based on the price or based on the quantity of the counter currency.

> No one has .0000145 cents in their account. Rounding occurs in the real world.

Indeed. But you either need to convince all parties to agree to round the same way or you need to accept small errors



My experience in consumer banking says that every instrument specifies the precision of the calculation, how and when rounding happens, and slew of little details.

So, yes, everyone has to understand how all their partners are doing rounding and summing.


In certain areas of the institutional finance world, everyone seems to accept that everyone's math is allowed to differ by a few cents, and they tally up the errors and move on with their lives.

I would, however, by quite surprised if my personal bank account did this.


When the bank owes you money, they round down.

When you owe the bank money, they round up.


Unless you work for the bank, in which case your annual salary is divided by 12 and rounded up for a monthly figure.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: