ScottGeilen/MoneyManagingApplication

Infinite "You have $X left to budget" Rounding Error

Opened this issue · 0 comments

When budgetting, it is impossible to finish due to rounding error. $158.92 ends up being something like $158.9200000000000000001.

You have $158.92 left to budget.
Budget category: rent
Budget amount: $158.92
Please input a budget amount smaller than paycheck amount.
Budget amount: $158.9
You will allocate $158.90 for rent
You have $.02 left to budget.
Budget category: other
Budget amount: $.02
Please input a budget amount smaller than paycheck amount.
Budget amount: $.01
You will allocate $.01 for other
You have $.01 left to budget.
Budget category: other1
Budget amount: $.01
Please input a budget amount smaller than paycheck amount.
Budget amount: $.01
Please input a budget amount smaller than paycheck amount.