Closed liakify closed 4 years ago
Proposed fixes:
I think it should be an input constraint instead. If anything is input with more than 2 decimals, raise warning/error since that's kind of not going to happen for normal expenses. As for uneven splitting, it is most unfortunate but will have to be accepted since there's no way to reconcile it even if you use a pocket calculator. I think the best we can do is to distribute the error across all people. Simply find the error, and assign a tiny fraction of it randomly to people involved until the error is minimized. That way at least statistically speaking it should be amortized.
How do we reconcile the internal value representations with what is displayed? Highly suspect people will try and poke around with this aspect during bug hunt if they can't figure any CRUD bugs (our CRUD aspect should generally be well covered by our tests).
expense p/you p/sam p/tom e/0.01 d/free money
Internally each person owesyou
1/3 cents, but display rounding to 2dp will result in $0.00 entries being displayed.expense p/you p/sam p/tom e/0.015 d/rounding pls
Internally,sam
andtom
oweyou
1/2 cents. However, 0.005 and 0.015 gets rounded to 0.01 and 0.02 respectively when displayed, so visually the debt values don't reconcile.expense p/you p/sam p/tom e/0.01499999 d/roundabout
expense p/you p/tom e/0.01 d/more rounding