Subtract with carry

From Wikipedia, the free encyclopedia

Subtract-with-carry (SWC) is a pseudorandom number generator created by George Marsaglia and Arif Zaman in 1991.[1] It falls into a class of generators known as lagged Fibonacci generators, where each new number in the sequence is a function of two previous numbers at fixed distances ("lags").

SWC is one of three random number generator engines included in the standard C++11 library.[2] It belongs to a family of generators that also includes add-with-carry and subtract-with-borrow engines.[1]

Example

References

Related Articles

Wikiwand AI