Subtract with carry
Subtract with carry is a pseudorandom number generator of the lagged Fibonacci type introduced by George Marsaglia and Arif Zaman in 1991.[1] It is one of three random number generator engines included in the standard C++11 library.
Subtract with carry generates a sequence of numbers using the recurrence relation:
where has the value 1 if , otherwise . R and S are constants known as the long and short lags.[2]
References
- ↑ A New Class of Random Number Generators, George Marsaglia and Arif Zaman, The Annals of Applied Probability, Vol. 1, No. 3, 1991
- ↑ subtract_with_carry Class, Microsoft Visual Studio 2010