Consider the following equation: $$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) = 130.1615.$$
I want to take the above and add 3% non-compounded, meaning I want to take 3% of 100 and add it to the value, but I don't want to do:
$$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) + (100 * 0.03).$$
Is there a way I can add 3 percent without using 100. I thought I could do:
$$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) * 1.03,$$ but this doesn't work, and $$\Bigl(\bigl((100 + 5 - 2) * 1.15 + 6\bigr) * (1.07) - 3\Bigr) * 0.03$$ doesn't work either
Here is basically what I have to do, I have to reverse out the percentages and flat amounts to get back to the original value. I do not know the original value. I am only given the final value and in what order the percentages and flat amounts were applied. My other posts were mainly just dealing with compound amounts only or non-compound amounts. I actually did ask about mixing compound, non-compound, and flat, but never got a straight answer. I have already written a program to reverse the final amount using the adjustments and when I do the following it works fine:
(((100 + 5 - 2) * 1.15 + 6) * (1.07))
As soon as I want to add 3% non-compounded to this, the reason I don't want to use 100 is because I actually won't know this. This is just test data I am setting up, so I am trying to figure out how to do it without using 100 * (0.03).
Essentially, I am given 133.1615 and the adjustments and I have to reverse them out, now if they are all compound, non-compound, or flat, I am fine, but if I mix them, my program doesn't do it correctly. Right now I have if I am given:
(((100 + 5 - 2) * 1.15 + 6) * (1.07)) + (100 * 0.03) = 136.1615, to reverse it I am doing:
(((136.1615 / 0.03 + 1.07) - 6) / 1.15) + 2 - 5 which I know is wrong, regarding the 136.1615 / 0.03 part.
In resposne to Arturo's answer:
My program loops through the adjustments and as long as it keeps seeing a flat value, it adds them together. When it sees a non-compounded or compounded adjustment, it adds the flat value to the amount. The same applies to compound and non-compound amounts. As long as the previous value was a compound, it just multiplies the current one to the previous one and if it is non-compounded, it adds it or subtracts it from the previous one, so given 130.1615, my program prints statements like this to show what it is doing:
130.1615 + 3
133.1615 / 1.07
124.45 - 6
118.45 / 1.1150 = 103
103 - 3 = 100
Given a dollar amount (value), remove adjustments (flat amounts, compound percentages, non-compound percentages) from the value to get back the initial value before the adjustments were applied. The adjustments don't necessarily have to just be added to the initial value, they also be removed, so in that case, you must add the adjustment to get back to the initial value.
Set of Adjustments