basement-0.0.11: Foundation scrap box of array & string

LicenseBSD-style
Safe HaskellNone
LanguageHaskell2010

Basement.Alg.XorShift

Description

XorShift variant: Xoroshiro128+ https://en.wikipedia.org/wiki/Xoroshiro128%2B

Xoroshiro128+ is a PRNG that uses a shift/rotate-based linear transformation. This is lar

C implementation at: http://xoroshiro.di.unimi.it/xoroshiro128plus.c

Synopsis

Documentation

data State Source #

State of Xoroshiro128 plus

Constructors

State !Word64 !Word64 

next :: State -> (Word64 -> State -> a) -> a Source #

Given a state, call the function f with the generated Word64 and the next State

nextDouble :: State -> (Double -> State -> a) -> a Source #

Same as next but give a random value of type Double in the range of [0.0 .. 1.0]

jump :: State -> State Source #

Jump the state by 2^64 calls of next