Sort:  

Hmm, I don't understand the logic behind that math.

I would think you would calculate it something like this:

weight_of_1_HP = 1 / total_HP
weight_of_1_vote_for_country = 1 / country.eligible_voters
weight_of_1_HP_for_country = weight_of_1_HP / weight_of_1_vote_for_country
account_HP_vote_weight_compared_to_country = account_HP * weight_of_1_HP_for_country

I see what you did there.
(1 / total_HP) / (1 / country.eligible_voters) = country.eligible_voters / total_HP