Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: andrea on November 25, 2003, 07:03:07 PM

Title: Poll result percentage sum different from 100%
Post by: andrea on November 25, 2003, 07:03:07 PM
Poll results sum differs from 100%. Maybe the easiest would be to change the percentage printout format fromĀ  9.0 to 9.2. I know the sum then still would not be 100% however it would be less obvious.

Attachment: sample screenshot
Title: Re: Poll result percentage sum different from 100%
Post by: [Unknown] on November 25, 2003, 09:59:57 PM
It's only 1% off... I would think it's acceptable variance... but I guess one deicmal point isn't that much.

-[Unknown]
Title: Re: Poll result percentage sum different from 100%
Post by: David on November 25, 2003, 11:29:22 PM
Polls rarly add up to 100 especially once we allow people to vote for multiple things it is even more hectic.  Maybe just show results to one decimal place if showing no decimals doesn't add to 100.
Title: Re: Poll result percentage sum different from 100%
Post by: pulpitfire on November 25, 2003, 11:33:26 PM
the other day, I was able to modify someone else's poll.  it just displayed the links for editing, as if I had started it.
Title: Re: Poll result percentage sum different from 100%
Post by: David on November 25, 2003, 11:48:53 PM
Quote from: pege on November 25, 2003, 11:33:26 PM
the other day, I was able to modify someone else's poll.  it just displayed the links for editing, as if I had started it.
Have a URL to which thread?  If it was the test board it is because you have that permission there.
Title: Re: Poll result percentage sum different from 100%
Post by: andrea on November 26, 2003, 01:27:27 AM
Quote from: [Unknown] on November 25, 2003, 09:59:57 PM
It's only 1% off... I would think it's acceptable variance... but I guess one deicmal point isn't that much.

Sure its 1%, because the "rounding error" is typically 1% off if integers are used. If you prefer integers then an alternative to make it 100% were adding the rounding difference to one option for example to the last. The last would then not be calculated by division but by "100% - previous sums".

Of course I am maybe biassed here because a part of my daily job is the programming of statistics. And if one of my statistics would not sum up to 100% the program would be returned to me as unfinished... There are various algorithms where to put a possible rounding difference.
Title: Re: Poll result percentage sum different from 100%
Post by: David on November 26, 2003, 02:09:57 AM
Fixed in the CVS
Title: Re: Poll result percentage sum different from 100%
Post by: andrea on November 26, 2003, 04:28:29 AM
I cannot believe that have forgotten to write this (looks like am getting really old): the screenshot in the 1st post shows that values are truncated instead rounded (if rounded the 1st value would be 46%). Rounding instead truncating also decreases the probability for rounding differences - therefore better round the percentage.
Title: Re: Poll result percentage sum different from 100%
Post by: David on November 26, 2003, 04:29:16 AM
Yes, they are rounded.  If they do not add up perfectly to 100% then they are rounded to one decimal place.
Title: Re: Poll result percentage sum different from 100%
Post by: andrea on November 26, 2003, 04:41:34 AM
That sounds good.