commit f6785395c4f316074129f35880b0b94da6e5e054
parent ec314855bf22503ee1466620845aa5ad70caee14
Author: ocramz <zocca.marco@gmail.com>
Date: Mon, 29 Jan 2018 23:47:03 +0100
operator spacing
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/System/Random/MWC/Probability.hs b/src/System/Random/MWC/Probability.hs
@@ -321,7 +321,7 @@ zipf a = do
v <- uniform
let xInt = floor (u ** (- 1 / (a - 1)))
x = fromIntegral xInt
- t = (1 + 1 / x) ** (a-1)
+ t = (1 + 1 / x) ** (a - 1)
if v * x * (t - 1) / (b - 1) <= t / b
then return xInt
else go