Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int generators distribution no longer clustered around zero #97

Open
hangindev opened this issue Nov 12, 2021 · 0 comments
Open

int generators distribution no longer clustered around zero #97

hangindev opened this issue Nov 12, 2021 · 0 comments

Comments

@hangindev
Copy link
Contributor

hangindev commented Nov 12, 2021

In the post Understanding FsCheck, it was mentioned ints generated are not uniformly distributed but clustered around zero.

// see how the values are clustered around the center point
intGenerator
|> Gen.sample 30 10000
|> Seq.groupBy id
|> Seq.map (fun (k,v) -> (k,Seq.length v))
|> Seq.sortBy (fun (k,v) -> k)
|> Seq.toList

I believe it is no longer true since FsCheck 2.14.0 release. I verified that the results are now uniformly distributed by running the code snippet above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant