What is the problem?
There seems to be at least two potential bugs here:
- On the tally page, small numbers in calculations are displayed as "0" or not displayed at all.
- In the "backend", some small numbers are being calculated accurately and others are not.
I don't yet know if any of this will have an impact on the actual results of an election. See https://www.mediawiki.org/wiki/Anti-Harassment_Tools/SecurePoll_Improvements/Test_Results/Precision for a bit more background.
In the tally output of 20_9_5000_1730013084, in round 36 the actual earned votes for candidate 9 is 6.8626284368883533E-6, but is displayed as 0. I thought we were supposed to round numbers to 6 decimal places, so this should display as something like .000007. Moreover, in spite of the "earned" votes being "0", the total votes goes up from 82.000568 to 82.000574.
In 20_9_5000_439818328, between rounds 3 and 13, candidate 9 does technically have votes transferred to them (of the order of ~4.80449350E-17), but this is not displayed at all (not even as "0"). For example, below candidates 10, 11 and 12 are eliminated because they have 82 votes. Candidate 9 is shown as having 82 votes as well (and nothing transferred), but is not eliminated.
Compare this to 20_9_5000_1730013084, where even smaller numbers (such as 7.810096726086052E-21) are being stored accurately.
Steps to reproduce problem
All the files necessary to reproduce the two elections above are here:
- 20_9_5000_1730013084: https://www.mediawiki.org/wiki/Anti-Harassment_Tools/SecurePoll_Improvements/Test_Results/20_9_5000_1730013084
- 20_9_5000_439818328: https://www.mediawiki.org/wiki/Anti-Harassment_Tools/SecurePoll_Improvements/Test_Results/20_9_5000_439818328