Closed firesofmay closed 9 years ago
Haha that's ridiculous. Thanks for the report.
Based on the fact that bounded-int
is used by double
, my guess would be that double
was the motivating use case. But I can imagine wanting it in other situations -- in particular, you want the large ranges afforded by choose
, but the slow initial growth of nat
& friends. choose
is different because it gives you a uniform distribution right off the bat, so even your "small" tests will use numbers drawn from the whole range.
Fix included in release 0.1.20
Following works fine:
But if you give slightly larger min it throws AssertionError:
Here's a test to check it as well
Note that If you don't randomise the size it'll pass.
Is this a valid failure?
Also I am not clear why is this function useful over choose? Thanks.