split-pro
split-pro copied to clipboard
Exact split incorrect calculation
Total bill 78.30.
Tried to split it 48.70 + 29.60, but the moment I wrote 48.70, it said the balance was 29.5999999994.
When I typed that the second person is 29.60, it said the remaining is -1.4210xxxx
ah that's bad, will work on it
I don't know if Javascript allows that, but I'd just use fixed-point numbers with 3 decimal digits...
Just a +1 from my side, looking into migrating to Split Pro vom Splitwise and running into the same issue. Floats cannot represent the exact fractions needed for monetary values.
My issue is similar but just about not the same, when adding a , to the amount it no longer counts towards the total balance
This is on a selfhosted docker instance installed two days ago.
There is a PR open for this issue: https://github.com/oss-apps/split-pro/pull/135