User Tools

Site Tools


cw4:4rpl_tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cw4:4rpl_tools [2025/08/18 16:56] – [Pseudo RNG based on Linear congruential generator (LCG)] kallicw4:4rpl_tools [2025/08/29 21:04] (current) – [Pseudo RNG based on Linear congruential generator (LCG)] kalli
Line 4021: Line 4021:
 ->last ->last
 ->first ->first
- elapsedtime dup 10 log ceil 7 sub neg 10 swap pow mul <-first <-last @seededLcgRandInt+ elapsedtime dup 10 log ceil 7 sub neg 10 swap pow mul asint <-spikedLcgAdd 1 add dup ->spikedLcgAdd mul @seededLcgRand01 <-last <-first sub mul <-first add asint
   
 :spikedLcgRand01 :spikedLcgRand01
- elapsedtime dup 10 log ceil 7 sub neg 10 swap pow mul @seededLcgRand01+ elapsedtime dup 10 log ceil 7 sub neg 10 swap pow mul asint <-spikedLcgAdd 1 add dup ->spikedLcgAdd mul @seededLcgRand01
  
 :seededLcgRandInt # INPUT: integer seed + integer first randInt + integer last randInt. OUTPUT: an integer in between the first and last randInt, excluding the last randInt. :seededLcgRandInt # INPUT: integer seed + integer first randInt + integer last randInt. OUTPUT: an integer in between the first and last randInt, excluding the last randInt.
cw4/4rpl_tools.1755536174.txt.gz · Last modified: 2025/08/18 16:56 by kalli