1
$\begingroup$

I have encountered this formula in a some software I'm reverse engineering:

NewAmount = ((SumofRates) * (1 - (1 - BPT_TAX))) 

and I simplified it to

NewAmount = SumofRates * (1 - (1 - BPT_TAX)) 

and then I took it to this (is that my mistake?):

NewAmount = SumofRates * (1 - 1 - BPT_TAX) 

I mean.. what is the point of the parenthesis if you're just doing subtraction, right? So this essentially is

NewAmount = SumofRates * (0 - BPT_TAX) 

so does it equal

NewAmount = SumofRates * (-BPT_TAX) 

I stopped for a second - that can't be right. I tried to do this in excel 1 - (1 - BPT_TAX) and I always came up with BPT_Tax as my final answer. So the parenthesis do mean something after all!

So then why wouldn't the developer just do :

NewAmount = SumofRates * BPT_TAX 

in the original formula? Am I missing something here?

  • 2
    A - (B + C) means A + - 1*(B+C)... you need to distribute that negative 1. In general, A - (B + C) = A - B - C. You are subtracting both B and C from A.2011-04-07

2 Answers 2

4

1 - (1 - BPT_TAX) = 1 - 1 + BPT_TAX

  • 0
    of course!! I didn't flip the - to +2011-04-07
5

By dropping the parentheses in the term (1 - (1 - BPT_TAX)), you're trying to apply the associative property.

The associative property doesn't work for subtraction. For example:

$(5 - 3) - 2 \neq 5 - (3 - 2)$

When removing the parentheses, you need to change the inner subtraction to addition.

(1 - 1 + BPT_TAX)