JuliaRandom / RandomNumbers.jl

Random Number Generators for the Julia Language.
https://juliarandom.github.io/RandomNumbers.jl/stable
Other
97 stars 23 forks source link

zero seeds give zeros #48

Closed ChrisRackauckas closed 6 years ago

ChrisRackauckas commented 6 years ago

MWE:

using RandomNumbers
rng = Xorshifts.Xoroshiro128Plus(0)
randn(rng,Float64) # 0.0
sunoru commented 6 years ago

Yes, I think this is the expected output. If you want to specify a seed when using a RNG, you should be aware that 0 isn't a good seed.

Maybe I should add a warning here?

ChrisRackauckas commented 6 years ago

I would make it error

sunoru commented 6 years ago

You are right. I updated the code.

PallHaraldsson commented 5 years ago

Nevermind, I'm on Julia 0.5 so old version of your package: Maybe I'm missing something, but the MWE is still broken.