Buglet in QuickCheck

Dylan Thurston dpt@math.harvard.edu
Wed, 3 Jul 2002 09:50:00 -0400


--jRHKVT23PllUwdXP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

--jRHKVT23PllUwdXP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9IwEFVeybfhaa3tcRAm5dAKCR3WR9bSTKrz9gRXV0T2x1BtKzOgCfRmrT
TXYnwKk6T6JYuZ/poDxL5mE=
=DHI8
-----END PGP SIGNATURE-----

--jRHKVT23PllUwdXP--