hi,
i think that's a math problem rather than computer...
have a current price and the previous price on a table
my software calculates the perc reduction from the previous price
and then i add a +x% to the final price...example +6% +20% tax
but finally it doesn't match to the current price + 6% + 20% tax
specific example:
current price 1511.75
previous price 1665.78
so the exact percentage reduction is -9.24671925464347% that i'm rounding to -9
well... if i add 6% and 20% to the previous price
i get 1665.78*1.06*1.20= 2118.87*0.91= 1928.17
my software does that
but it doesn't match to current price 1511.75*1.06*1.20= 1922.94
where is the mistake and how to avoid?
thanks
edit: ok, understood...if i want the exact value i can't round the percentage but it must be accurate otherwise when we have to do with prices they can swing too much...


LinkBack URL
About LinkBacks