apportionment

Round a set of numbers while maintaining its sum

https://hub.darcs.net/thielema/apportionment

Version on this page:0.0.0.4@rev:1
LTS Haskell 23.23:0.0.0.4@rev:1
Stackage Nightly 2025-05-19:0.0.0.4@rev:1
Latest on Hackage:0.0.0.4@rev:2

See all snapshots apportionment appears in

BSD-3-Clause licensed by Henning Thielemann
Maintained by [email protected]
This version can be pinned in stack with:apportionment-0.0.0.4@sha256:0e33faad2507ee9ebf52f55bfaf7c03d8d7b40ec35e1120ea08f443bb7fd2c14,1584

Module documentation for 0.0.0.4

Round a set of numbers while maintaining its sum. According procedures are used to assign seats to parties in a parliament. You may also use it to round percentages that sum up to 100%. https://en.wikipedia.org/wiki/Apportionment_(politics)