I have a question that I've been thinking a long time about without being able to come up with an answer and would appreciate some help:
I am attempting to subtract two distinct fees from a total transaction, depending on transaction price.
Fee #1 = 2.9% of transaction price Fee #2 = 10% of transaction price
Let T = transaction price. Therefore : Let F = Total Fees
F = T(0.029) + T(0.1)
F = T(0.129)
F / 0.129 = T
This seems to look ok, HOWEVER, in the real world, each fee is rounded to the nearest cent. So, for Fee #1, assuming a transaction price of 10.99, the fee would be 0.31871 and thus rounded to 0.32. This would give a slightly different result from the algebraic result, given this rounding phenomenon.
My question is, in equations such as the one in the example, is there a way to account for discrete rounding of terms before solving for a variable?
In most generality: Trial and error. Most notably, since $0.129<1$, there are many (about eight) $T$ leading to the same rounded $F$. If you are given $T+F$ instead, i.e. a factor that should equal $1.129>1$, you can determine $T$ uniquely (and there are some values of $T+F$ that cannot legally be obtained): Compute $\operatorname{round}((T+F)/1.129)$ and try this value (i.e. compute $F$ from it); if it is too high/low, try one cent less/more. In your original problem, all you can do is compute $\operatorname{round}(F/0.129)$ and try several cents up and down until the backwards calculation produces a differnt $F$.