Real Life Rounding Phenomena When Solving for Variables

110 Views Asked by At

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?

2

There are 2 best solutions below

1
On BEST ANSWER

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$.

0
On

How about multiplying by a factor $c$ first, then dividing the final answer by the same factor again?

For $f_1=$ fee #1, $f_2=$ fee #2, $c = 10$.

$$F\cdot c = T(f_1 \cdot c) + T(f_2 \cdot c) = T((f_1+f_2)\cdot c)$$

$$F = \frac{T((f_1+f_2)\cdot c)}{c}$$

Of course you solve the parentheses and numerator first. You can use bigger values of $c$ if you need more accuracy. e.g. $c=100, 1000, \ldots$.