Frustrated with the current bookkeeping app I use, I've decided to start making my own with the intent to publish it. While I was on it, one thing that was immediately apparent is what happens to those "leftover" amounts when, say, $10 is divided by 3. It happens when a transaction gets split.
I did some research on the matter, but unfortunately haven't found any other answer aside from "do what you're accustomed to doing" or simply following the usual rounding rules (0.016 = 0.02; 0.034 = 0.03).
Are there any laws or regulations that specifically say what happens to those leftover amounts (or what they're even called)?
They're pretty small, but over tens of thousands of transactions, those $0.01 add up.
If specific context is needed, I'm from the Philippines
Edit: I'm asking about how calculations are done for finance and the considerations needed (legal or whatnot, if any), and not how to program it.