Just to clarify, the original code is more complex than calculating sales tax, but it consists of conditionals and simple arithmetic, so I’m using sales tax calculation as a stand-in. The logic is not simple multiplication.
I agree that my example is a pretty awful way to calculate sales tax (only 2 states? repeating the multiplication in the interest of not repeating code? wtf indeed.) but it’s only there because it was the first thing I came up with when thinking of conditional math.