def step_with

bend-collections-laws-crypto@1.0.0.0 · src/math/random/pcg.bend:59

import bend-collections-laws-crypto@1.0.0.0/src/math/random/pcg.bend as Pcg
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as X

59# state * (mh:ml) + (ih:il) mod 2^128 (Go's (*PCG).next with its constants
60# as parameters)
61def step_with(+mh: W.U64, +ml: W.U64, +ih: W.U64, +il: W.U64, p: PCG) -> PCG:
62  match p:
63    case P{+hi, +lo}:
64      step_mul(mh, ml, ih, il, hi, lo, X.mul128(lo, ml))

Uses (4)

Used by (3)