Skip to content

Commit edf2877

Browse files
authored
Merge pull request #82 from mtsch/fix-xoshiro-256-seed
Fix `seed!` for Xoshiro256
2 parents 8a3d9dd + 63ed790 commit edf2877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xorshifts/xoshiro256.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ copy(src::T) where T <: AbstractXoshiro256 = copyto!(T(), src)
6363

6464
==(r1::T, r2::T) where T <: AbstractXoshiro256 = r1.x == r2.x && r1.y == r2.y && r1.z == r2.z && r1.w == r2.w
6565

66-
seed!(r::AbstractXoshiro256, seed::Integer) = seed!(r, init_seed(seed % UInt64))
66+
seed!(r::AbstractXoshiro256, seed::Integer) = seed!(r, init_seed(seed, UInt64))
6767
function seed!(r::AbstractXoshiro256, seed::NTuple{4, UInt64}=gen_seed(UInt64, 4))
6868
all(==(0), seed) && error("0 cannot be the seed")
6969
r.x = seed[1]

0 commit comments

Comments
 (0)