License | Public Commons |
---|---|
Maintainer | kanai.hiroki12@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
This module is implementation of xorshift128+ random number generator. Read original implementation and description is strictly recommended.
The generator state is stored in the Gen
data type and
it is created by initialize
function with seed value or
calling Gen
data constructor with generator state.
To generate random values, first initialize
a random number
generator by seed value.
let gen = initialize
3748374974327
Then generate a random number by next
or next01
.
let (v, gen') = next
gen
let (v, gen') = next01
gen