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

FSharp.Stats.Distributions.Empirical.random yields the same number if called in a short time frame #37

Closed
ZimmerD opened this issue Jul 8, 2019 · 1 comment
Assignees
Labels

Comments

@ZimmerD
Copy link
Member

ZimmerD commented Jul 8, 2019

Description

FSharp.Stats.Distributions.Empirical.random makes wrong use of a random number generator

How to reproduce

e.g.
[
for i = 1 to 100 do
yield random exampleDistribution
]

Expected behavior

a splendid sample of numbers present in the example distribution.

Actual behavior

the loop above will yield 100 times the same number because the random number generator is created each time when the function is called but everytime with the same seed. (I believe system time)

Fixed by

Using the random number logic of FSharp.Stats.

@ZimmerD ZimmerD added the bug label Jul 8, 2019
bvenn pushed a commit that referenced this issue Jul 9, 2019
@bvenn
Copy link
Member

bvenn commented Jul 9, 2019

closed by a1544ee

@bvenn bvenn closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants