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
cw4:4rpl_tools [2025/08/29 15: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 asint <-spikedLcgAdd dup 1 add ->spikedLcgAdd mul @seededLcgRand01 <-last <-first sub mul <-first add asint+ 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 asint <-spikedLcgAdd dup 1 add ->spikedLcgAdd 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.txt · Last modified: 2025/08/29 21:04 by kalli