You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: