Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Linear congruential generator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==LCG derivatives== There are several generators which are linear congruential generators in a different form, and thus the techniques used to analyze LCGs can be applied to them. One method of producing a longer period is to sum the outputs of several LCGs of different periods having a large [[least common multiple]]; the [[Wichmann–Hill]] generator is an example of this form. (We would prefer them to be completely [[coprime]], but a prime modulus implies an even period, so there must be a common factor of 2, at least.) This can be shown to be equivalent to a single LCG with a modulus equal to the product of the component LCG moduli. [[George Marsaglia|Marsaglia]]'s add-with-carry and [[Subtract with carry|subtract-with-borrow]] PRNGs with a word size of ''b''=2<sup>''w''</sup> and lags ''r'' and ''s'' (''r'' > ''s'') are equivalent to LCGs with a modulus of ''b<sup>r</sup>'' ± ''b<sup>s</sup>'' ± 1.<ref>{{cite conference |title=On the Lattice Structure of the Add-with-Carry and Subtract-with-Borrow Random Number Generators |first1=Shu |last1=Tezuka |first2=Pierre |last2=L'Ecuyer |url=https://core.ac.uk/download/pdf/39215926.pdf |date=October 1993 |publisher=Kyoto University |conference=Workshop on Stochastic Numerics }}</ref><ref>{{cite conference |url=http://www.informs-sim.org/wsc92papers/1992_0059.pdf |first1=Shi |last1=Tezuka |first2=Pierre |last2=L'Ecuyer |title=Analysis of Add-with-Carry and Subtract-with-Borrow Generators |conference=Proceedings of the 1992 Winter Simulation Conference |date=December 1992 |pages=443–447 }}</ref> [[Multiply-with-carry]] PRNGs with a multiplier of ''a'' are equivalent to LCGs with a large prime modulus of ''ab<sup>r</sup>''−1 and a power-of-2 multiplier ''b''. A [[permuted congruential generator]] begins with a power-of-2-modulus LCG and applies an output transformation to eliminate the short period problem in the low-order bits.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)