Skip to content

Commit 63ed790

Browse files
committed
Fix seed! for Xoshiro256
1 parent 8a3d9dd commit 63ed790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xorshifts/xoshiro256.jl

Lines changed: 1 addition & 1 deletion
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)