I was monthly-budgeting for annual expenses with (-14.99 / 12) USD etc. and ended up with this humorous floating point math error: On-budget accounts and budget total do not match: (54321.71 USD) vs (54321.71000000000000000000002 USD). I had tolerances configured to accept this difference, but the rebudged plugin didn't take tolerances into account.
This change makes balance_check only raise the error when the difference exceeds the tolerances.
By default the tolerances are still zero, so this code will still raise the error until the user changes the default tolerances option via option "inferred_tolerance_default" "USD:0.001" or option "inferred_tolerance_default" "*:0.001"
I was monthly-budgeting for annual expenses with
(-14.99 / 12) USD
etc. and ended up with this humorous floating point math error:On-budget accounts and budget total do not match: (54321.71 USD) vs (54321.71000000000000000000002 USD)
. I had tolerances configured to accept this difference, but the rebudged plugin didn't take tolerances into account.This change makes balance_check only raise the error when the difference exceeds the tolerances.
By default the tolerances are still zero, so this code will still raise the error until the user changes the default tolerances option via
option "inferred_tolerance_default" "USD:0.001"
oroption "inferred_tolerance_default" "*:0.001"