little math/programming problems April 2023
|
05-14-2023, 12:16 PM
Post: #9
|
|||
|
|||
RE: little math/programming problems April 2023
The following pRNG may be helpful if sampling the dice throws is a problem. It's a specially constructed linear congruential generator designed for die rolling.
Letting X stand for the internal state, one has X = X * 93847949523997033 Mod ( 216172782113784439 ) The die roll is X ( Mod 6 ) or X ( Mod 6 ) + 1 The only constraint is that the first X must be non-zero 0 < Xo < 93847949523997033. If this version has distributional problems, I got millions more available. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 12 Guest(s)