
3 Jul
2002
3 Jul
'02
1:50 p.m.
In the definition of 'done' in QuickCheck, there is the following definition:
percentage n m = show ((100 * n) `div` m) ++ "%"
There may be specific reasons for wanting to round downwards, but failing that, a more accurate function would be
percentage n m = show ((200 * n + m) `div` (2 * m)) ++ "%"
--Dylan Thurston