From e4bd80c26d35498bceda4f47d97682842bfc354c Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 18 Oct 2020 00:38:07 +1100 Subject: [PATCH] Fix logic errors - eek! --- pyRCV2/method/STVCCounter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyRCV2/method/STVCCounter.py b/pyRCV2/method/STVCCounter.py index 2a83929..2396490 100644 --- a/pyRCV2/method/STVCCounter.py +++ b/pyRCV2/method/STVCCounter.py @@ -96,7 +96,7 @@ class STVCCounter: __pragma__('opov') surplus = count_card.votes - self.quota - transfer_value = surplus / self.quota + transfer_value = surplus / count_card.votes count_card.transfers -= surplus __pragma__('noopov') @@ -165,7 +165,7 @@ class STVCCounter: # Compute quota __pragma__('opov') total = sum((cc.votes for c, cc in self.candidates.items()), Num('0')) - self.quota = total / Num(self.election.seats) + self.quota = total / Num(self.election.seats + 1) __pragma__('noopov') def elect_meeting_quota(self):