mirror of
https://github.com/PDP-10/its.git
synced 2026-01-11 23:53:12 +00:00
Xoroshiro pseudo-random number generator.
This is a version of the xoroshiro PRN generator with 36-bit output. The 2⁷²-1 period coefficients in prim.txt were graciously provided by Sebastiano Vigna. https://vigna.di.unimi.it/ftp/papers/ScrambledLinear.pdf
This commit is contained in:
parent
849ed5ec92
commit
f8c728bf33
30
src/lars/xorosh.2
Normal file
30
src/lars/xorosh.2
Normal file
@ -0,0 +1,30 @@
|
||||
.begin xoroshiro
|
||||
|
||||
xstate: -1,, ? 1
|
||||
|
||||
parm.a==2
|
||||
parm.b==9
|
||||
parm.c==5
|
||||
parm.r==11.
|
||||
|
||||
xoroshiro:
|
||||
push p,t
|
||||
move t,xstate
|
||||
xorm t,xstate+1
|
||||
rot t,parm.a
|
||||
xor t,xstate+1
|
||||
movem t,xstate
|
||||
move t,xstate+1
|
||||
lsh t,parm.b
|
||||
xorm t,xstate
|
||||
move t,xstate+1
|
||||
rot t,parm.c
|
||||
movem t,xstate+1
|
||||
pop p,t
|
||||
move a,xstate
|
||||
add a,xstate+1
|
||||
rot a,parm.r
|
||||
add a,xstate
|
||||
popj p,
|
||||
|
||||
.end
|
||||
Loading…
x
Reference in New Issue
Block a user