Making % add up to the original whole number?
For clarity, are you concerned that =SUM(50*p1, 50*p2, 50*p3) returns
something like 50.0000000000001 or something like 51?
For the first case, you are seeing the impact of finite precision which
impacts all software except symbolic math packages like Maple and
Mathematica. Depending on the particular percentages that you are using, you
might reduce the impact by using BCD (binary coded decimal, imployed by a
small minority of software packages) calculations instead of binary (NickHK'
s suggestion), but in general it is not possible to eliminate it altogether,
except symbolically.
In the second case, you are seeing the impact of your own rounding of the
multiplication results. No software (not even symbolic packages) can read
your mind to know which rounded value you want to arbitrarily distort to
restore the unrounded sum. Excel's pie chart will use the strategy that Tom
suggested, but you didn't seem happy with that. Note that there may not
always be one closest to rounding the other way, as when p1=p2=p3=1/3. Nor
is it neccessarily the case that the number closest to rounding the other way
would have the smallest percent distortion if forced to round the other way.
TANFL
Jerry
"Stephen" wrote:
I am trying to mulitply an original number (say 50) by a series of
percentages adding up to 100%. When Excel adds them together, due to
rounding, they don't add up to the original number. Do you know how I can
get it to round correctly to get the original number?
|