Post Reply 
Modification of Linear Congruential Generator
10-14-2020, 03:07 PM
Post: #2
RE: Modification of Linear Congruential Generator
(10-13-2020 03:34 AM)ttw Wrote:  In all cases, the continued from A/M where A is the multiplier and M is the modulus, should have all "small" partial quotients. (A large partial quotient means that the entire cycle seems to be made of a few long cycles.)

Can you explain what it meant ? An example would be nice.

Quote:Short example: M=61493, A=27614 Cycle length: 32746 (fits in 32 bits)

Long example: M=274877910173, A=52905939427 Cycle length: 137438955086

Cycle length should be n = order(A, M), i.e. smallest powers n, such that A^n ≡ 1 (mod M)

>>> pow(27614, 15373, 61493)
1L
>>> pow(52905939427, 68719477543, 274877910173)
1L

Perhaps you may be interest in PCG


Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Modification of Linear Congruential Generator - Albert Chan - 10-14-2020 03:07 PM



User(s) browsing this thread: 1 Guest(s)