peterwsterling
Member
Posted 9 months ago #
The maths seems (is) wrong somehow! I (currently) have a poll ( http://www.sterling-adventures.co.uk/blog/2009/01/16/adventure-calendar-update/ ) with three answers and the summary says - 52% yes, 33% no, 10% not sure. That's not 100%, it's just 95%!? So where have those other 5% gone?! Surely it's not a rounding error, that should only account for maybe 1% max. Although even a rounding error is silly - it should be 100% of votes...
Yours confused and disappointed,
Pete.
Something might had happen when updating the polls votes and total votes on your server. If you can reproduce this let me know. Because I tired and i am not being able to reproduce this bug.
I am sorry that my free plugin disaapointed you. Why not try polldaddy.com?
peterwsterling
Member
Posted 9 months ago #
Yep, I can reproduce it - just visit the link above...
Different numbers now, adds up to 97% !
What are the steps to reproduce it?
By setting up a new poll and waiting for people to vote will not reproduce the problem as it might be your server issue or the people voting.
I have 300+ votes currently in my poll http://lesterchan.net/wordpress/ and it still adds up to 100%
Because your have 3 answers and depending on the choices that users votes, it will likely be less than or more than 100%.
If you got 1 vote for each choice, you will have 33/33/33/. As you choice to hide the number of voters, I can't calculate. Take the number of votes for each answer and then divide the number by total voters.
But to take your feedback seriously, I have updated the code to ensure that the % is always 100% by adding the remaining/shortage % to the last value.
peterwsterling
Member
Posted 9 months ago #
Thanks - I'm glad you've changed the maths, 'cos even with rounding error I don't see how more than a total error of 1% can occur per answer? So for a three answer poll the lowest total would be 97%. But right now I have 96%, and previously I had 95%...
The new maths - THANKS for that - will be better. ;-)
Yeap, it will be in WP-Polls 2.50 which will be out with WP2.8 is release or around that time =)