
19 Aug
2015
19 Aug
'15
10:46 a.m.
I have uploaded a new package to Hackage implementing two methods for rounding a set of numbers while maintaining their sum. Useful applications are elections of parliaments and rounding percentages. E.g. Prelude> Apportionment.largestRemainderScaled 100 [1,2,3 :: Double] [17,33,50] Prelude> Apportionment.largestRemainderScaled 100 [1,1,1 :: Double] [34,33,33] The package is very simple, yet useful. It's plain Haskell 98. https://hackage.haskell.org/package/apportionment
3609
Age (days ago)
3609
Last active (days ago)
0 comments
1 participants
participants (1)
-
Henning Thielemann