~/bend-docscommunity

spec/math/random/pcg.bend checks

raw source on the hub · import bend-collections-laws-math@1.0.0.0/spec/math/random/pcg.bend as Pcg

2 imports
import Base
import ../../lib/common.bend as C

Definitions

def b2n source · line 22 · raw

@b:Bool -> Nat

def xor_bits source · line 30 · raw

@w:Nat -> @+a:Nat -> @+b:Nat -> Nat

the exclusive or of the low w bits of a and b

def lcg source · line 37 · raw

@+mul:Nat -> @+inc:Nat -> @+s:Nat -> Nat

def dxsm3 source · line 40 · raw

@+h:Nat -> @+lo:Nat -> Nat

def dxsm1 source · line 44 · raw

@+cm:Nat -> @+hi:Nat -> Nat

the first half: hi ^= hi >> 32; hi *= cm

def dxsm source · line 47 · raw

@+cm:Nat -> @+hi:Nat -> @+lo:Nat -> Nat